Skip to content

feat(pyamber): match Java binary hashes - #8250

Open
carloea2 wants to merge 1 commit into
apache:mainfrom
carloea2:fix/java-hash-signed-bytes
Open

feat(pyamber): match Java binary hashes#8250
carloea2 wants to merge 1 commit into
apache:mainfrom
carloea2:fix/java-hash-signed-bytes

Conversation

@carloea2

@carloea2 carloea2 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Python tuple hashing now converts binary field bytes to signed Java byte values before applying the array hash. Existing values below 0x80 remain unchanged.

Any related issues, documentation, discussions?

Closes #8249

How was this PR tested?

python -c "import sys,pytest; sys.path[:0]=[r'C:\Users\carlo\texera\texera-worktrees\investigate-bug61\amber\src\main\python',r'C:\Users\carlo\texera\texera\amber\src\main\python']; raise SystemExit(pytest.main(['amber/src/test/python/core/models/test_tuple.py::TestTuple::test_hash_binary_with_high_byte_matches_java','amber/src/test/python/core/architecture/sendsemantics/test_partitioners.py','-q','-p','no:cacheprovider']))"
36 passed

ruff check amber/src/main/python amber/src/test/python
All checks passed

ruff format --check amber/src/main/python amber/src/test/python
213 files already formatted

Direct reproduction after the fix:

61

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Codex

@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Aug 31, 2026
@github-actions
github-actions Bot requested a review from xuang7 August 31, 2026 05:13
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. release/* labels drive the post-merge backport, so add or remove one to change where this fix lands.

Release branch Analysis
⚠️ release/v1.3 Not labeled automatically — none of the files this PR modifies exist on this branch (amber/src/main/python/core/models/tuple.py, amber/src/test/python/core/models/test_tuple.py). The fix may target code that isn't on this release, or the files were moved/renamed after the branch was cut. Please check and add release/v1.3 by hand if this fix should be backported here.
release/v1.2 Already labeled — this fix is queued to backport here.

Auto-label run.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @eugenegujing, @aglinxinyuan
    You can notify them by mentioning @eugenegujing, @aglinxinyuan in a comment.

@codecov-commenter

codecov-commenter commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.89%. Comparing base (50321e4) to head (0c0a9fb).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8250      +/-   ##
============================================
- Coverage     93.93%   93.89%   -0.05%     
+ Complexity     4762     4761       -1     
============================================
  Files          1191     1191              
  Lines         48308    49051     +743     
  Branches       5377     5377              
============================================
+ Hits          45380    46058     +678     
- Misses         1494     1558      +64     
- Partials       1434     1435       +1     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 50321e4
agent-service 99.32% <ø> (ø) Carriedforward from 50321e4
amber 90.02% <ø> (-0.02%) ⬇️ Carriedforward from 50321e4
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 50321e4
config-service 86.86% <ø> (ø) Carriedforward from 50321e4
file-service 87.91% <ø> (ø) Carriedforward from 50321e4
frontend 96.41% <ø> (ø) Carriedforward from 50321e4
notebook-migration-service 79.31% <ø> (ø) Carriedforward from 50321e4
pyamber 97.85% <100.00%> (-1.02%) ⬇️
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 50321e4

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 2 better · 🔴 5 worse · ⚪ 8 noise (<±5%) · 0 without baseline

Compared against main 50321e4 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 362 0.221 26,047/36,679/36,679 us 🔴 +9.8% / 🔴 +135.4%
🟢 bs=100 sw=10 sl=64 814 0.497 122,196/137,588/137,588 us 🟢 -12.5% / 🔴 +28.3%
🔴 bs=1000 sw=10 sl=64 897 0.548 1,114,779/1,219,731/1,219,731 us 🔴 +5.2% / 🔴 +19.2%
Baseline details

Latest main 50321e4 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 362 tuples/sec 394 tuples/sec 787.98 tuples/sec -8.1% -54.1%
bs=10 sw=10 sl=64 MB/s 0.221 MB/s 0.24 MB/s 0.481 MB/s -7.9% -54.0%
bs=10 sw=10 sl=64 p50 26,047 us 23,713 us 12,593 us +9.8% +106.8%
bs=10 sw=10 sl=64 p95 36,679 us 36,135 us 15,579 us +1.5% +135.4%
bs=10 sw=10 sl=64 p99 36,679 us 36,135 us 18,786 us +1.5% +95.2%
bs=100 sw=10 sl=64 throughput 814 tuples/sec 819 tuples/sec 1,008 tuples/sec -0.6% -19.2%
bs=100 sw=10 sl=64 MB/s 0.497 MB/s 0.5 MB/s 0.615 MB/s -0.6% -19.2%
bs=100 sw=10 sl=64 p50 122,196 us 119,498 us 100,701 us +2.3% +21.3%
bs=100 sw=10 sl=64 p95 137,588 us 157,222 us 107,244 us -12.5% +28.3%
bs=100 sw=10 sl=64 p99 137,588 us 157,222 us 116,122 us -12.5% +18.5%
bs=1000 sw=10 sl=64 throughput 897 tuples/sec 910 tuples/sec 1,042 tuples/sec -1.4% -13.9%
bs=1000 sw=10 sl=64 MB/s 0.548 MB/s 0.555 MB/s 0.636 MB/s -1.3% -13.8%
bs=1000 sw=10 sl=64 p50 1,114,779 us 1,098,774 us 981,959 us +1.5% +13.5%
bs=1000 sw=10 sl=64 p95 1,219,731 us 1,159,861 us 1,023,080 us +5.2% +19.2%
bs=1000 sw=10 sl=64 p99 1,219,731 us 1,159,861 us 1,051,697 us +5.2% +16.0%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,552.91,200,128000,362,0.221,26046.80,36678.84,36678.84
1,100,10,64,20,2456.96,2000,1280000,814,0.497,122195.82,137588.34,137588.34
2,1000,10,64,20,22295.08,20000,12800000,897,0.548,1114779.33,1219731.31,1219731.31

@Yicong-Huang
Yicong-Huang marked this pull request as draft August 31, 2026 19:57
@Yicong-Huang

Copy link
Copy Markdown
Contributor

I am converting this PR to a draft: please follow our PR template and mark it ready for review.

@carloea2
carloea2 marked this pull request as ready for review August 31, 2026 20:12
@carloea2

Copy link
Copy Markdown
Contributor Author

The description now follows the current template, and this is ready for review.

@carloea2 carloea2 changed the title fix(pyamber): match Java binary hashes feat(pyamber): match Java binary hashes Aug 31, 2026
@mengw15 mengw15 removed the release/v1.2 back porting to release/v1.2 label Aug 31, 2026
@xuang7 xuang7 removed the fix label Sep 1, 2026
@xuang7
xuang7 removed their request for review September 1, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High binary bytes can route to different hash partitions

5 participants