Skip to content

Unicode strings can route to different hash partitions #8247

Closed as duplicate
Closed as duplicate

Description

@carloea2

Feature Summary

Python tuple hashing iterates Unicode code points, while Java String hashing iterates UTF-16 code units. Characters outside the basic multilingual plane therefore produce different tuple hashes in the Python and JVM engines, which can route the same hash-shuffle key to different workers.

Before: the emoji key hashes to 128543 in Python and 1772930 with Java semantics

After: both engines hash the key to 1772930

Python string tuple hashing should iterate UTF-16 code units so hash shuffle routing matches the JVM for every valid Unicode string.

Reproduction evidence:

Hash a tuple with one string field containing 😀.

Observed values:

python_tuple_hash=128543
java_compatible_tuple_hash=1772930

Version and commit evidence:

1.3.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

50321e403c82df299a13deb50a7f9849dd93bdba

Proposed Solution or Design

After: both engines hash the key to 1772930

Affected Area

Workflow Engine (Amber)

Activity

  1. added theissue type on Aug 31, 2026
  2. changed the issue type fromtoon Aug 31, 2026
  3. carloea2 commented on Sep 5, 2026

    @carloea2
    ContributorAuthor

    /take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions