Skip to content

feat(pyamber): hash large binary tuples - #8244

Closed
carloea2 wants to merge 1 commit into
apache:mainfrom
carloea2:fix/hash-large-binary-tuples
Closed

carloea2 wants to merge 1 commit into
apache:mainfrom
carloea2:fix/hash-large-binary-tuples

Conversation

@carloea2

@carloea2 carloea2 commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Python tuple hashing now supports large binary fields by hashing their stored URI with the same nested hash structure used by the Java LargeBinary and Tuple implementations.

Any related issues, documentation, discussions?

Closes #8243

How was this PR tested?

python -c "import sys,pytest; sys.path[:0]=[r'C:\Users\carlo\texera\texera-worktrees\investigate-bug58\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_large_binary_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:

1754254834

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 04:58
@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.90%. Comparing base (50321e4) to head (cc8a2e7).
⚠️ Report is 100 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8244      +/-   ##
============================================
- Coverage     93.93%   93.90%   -0.04%     
+ Complexity     4762     4761       -1     
============================================
  Files          1191     1191              
  Lines         48308    49051     +743     
  Branches       5377     5377              
============================================
+ Hits          45380    46059     +679     
- Misses         1494     1557      +63     
- 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.87% <100.00%> (-1.01%) ⬇️
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

🟢 0 better · 🔴 3 worse · ⚪ 12 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 411 0.251 23,461/34,873/34,873 us 🔴 -11.8% / 🔴 +123.8%
⚪ bs=100 sw=10 sl=64 846 0.516 114,502/146,092/146,092 us ⚪ within ±5% / 🔴 +36.2%
⚪ bs=1000 sw=10 sl=64 976 0.596 1,022,329/1,080,350/1,080,350 us ⚪ within ±5% / 🔴 -6.3%
Baseline details

Latest main 50321e4 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 411 tuples/sec 466 tuples/sec 787.98 tuples/sec -11.8% -47.8%
bs=10 sw=10 sl=64 MB/s 0.251 MB/s 0.284 MB/s 0.481 MB/s -11.6% -47.8%
bs=10 sw=10 sl=64 p50 23,461 us 21,006 us 12,593 us +11.7% +86.3%
bs=10 sw=10 sl=64 p95 34,873 us 34,550 us 15,579 us +0.9% +123.8%
bs=10 sw=10 sl=64 p99 34,873 us 34,550 us 18,786 us +0.9% +85.6%
bs=100 sw=10 sl=64 throughput 846 tuples/sec 887 tuples/sec 1,008 tuples/sec -4.6% -16.1%
bs=100 sw=10 sl=64 MB/s 0.516 MB/s 0.541 MB/s 0.615 MB/s -4.6% -16.1%
bs=100 sw=10 sl=64 p50 114,502 us 113,198 us 100,701 us +1.2% +13.7%
bs=100 sw=10 sl=64 p95 146,092 us 143,751 us 107,244 us +1.6% +36.2%
bs=100 sw=10 sl=64 p99 146,092 us 143,751 us 116,122 us +1.6% +25.8%
bs=1000 sw=10 sl=64 throughput 976 tuples/sec 981 tuples/sec 1,042 tuples/sec -0.5% -6.3%
bs=1000 sw=10 sl=64 MB/s 0.596 MB/s 0.599 MB/s 0.636 MB/s -0.5% -6.3%
bs=1000 sw=10 sl=64 p50 1,022,329 us 1,009,947 us 981,959 us +1.2% +4.1%
bs=1000 sw=10 sl=64 p95 1,080,350 us 1,086,015 us 1,023,080 us -0.5% +5.6%
bs=1000 sw=10 sl=64 p99 1,080,350 us 1,086,015 us 1,051,697 us -0.5% +2.7%
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,486.95,200,128000,411,0.251,23460.54,34872.54,34872.54
1,100,10,64,20,2364.93,2000,1280000,846,0.516,114501.88,146091.56,146091.56
2,1000,10,64,20,20497.54,20000,12800000,976,0.596,1022329.39,1080349.87,1080349.87

@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.

@Yicong-Huang
Yicong-Huang marked this pull request as draft August 31, 2026 20:07
@carloea2
carloea2 marked this pull request as ready for review August 31, 2026 20:18
@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): hash large binary tuples feat(pyamber): hash large binary tuples 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
@carloea2

Copy link
Copy Markdown
Contributor Author

Consolidated into #8955, which covers the same large-binary routing change plus UTF-16 URI hashing. All three URI regressions and 356 broader tests pass on current main. #8955 now closes both issues.

@carloea2 carloea2 closed this Oct 15, 2026
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.

Hash shuffle crashes on large binary fields

5 participants