Skip to content

feat(pyamber): compare table row counts - #8230

Open
carloea2 wants to merge 1 commit into
apache:mainfrom
carloea2:fix/table-equality-row-count
Open

feat(pyamber): compare table row counts#8230
carloea2 wants to merge 1 commit into
apache:mainfrom
carloea2:fix/table-equality-row-count

Conversation

@carloea2

@carloea2 carloea2 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Require equal row counts before comparing table rows. This prevents the existing zip comparison from treating a shorter matching prefix as a fully equal table.

Any related issues, documentation, discussions?

Closes #8229

How was this PR tested?

python -c "import sys,pytest; sys.path[:0]=[worktree amber source, main amber source]; raise SystemExit(pytest.main(['amber/src/test/python/core/models/test_table.py','amber/src/test/python/pytexera/udf/test_udf_operator.py','-q','-p','no:cacheprovider']))"
71 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

A direct post-fix probe covered different lengths in both directions and the equal case:

short_equals_long=False
long_equals_short=False
short_equals_same=True
lengths=1 2

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

Generated-by: Codex

@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: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@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: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/table.py, amber/src/test/python/core/models/test_table.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.

@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.94%. Comparing base (70c2114) to head (a5e7859).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8230   +/-   ##
=========================================
  Coverage     93.94%   93.94%           
  Complexity     4759     4759           
=========================================
  Files          1185     1185           
  Lines         48069    48069           
  Branches       5359     5359           
=========================================
  Hits          45159    45159           
  Misses         1480     1480           
  Partials       1430     1430           
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 70c2114
agent-service 99.32% <ø> (ø) Carriedforward from 70c2114
amber 89.99% <ø> (ø) Carriedforward from 70c2114
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 70c2114
config-service 86.86% <ø> (ø) Carriedforward from 70c2114
file-service 87.91% <ø> (ø) Carriedforward from 70c2114
frontend 96.49% <ø> (ø) Carriedforward from 70c2114
notebook-migration-service 79.31% <ø> (ø) Carriedforward from 70c2114
pyamber 98.87% <100.00%> (ø)
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 70c2114

*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 · 🔴 2 worse · ⚪ 13 noise (<±5%) · 0 without baseline

Compared against main 70c2114 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 378 0.231 25,332/34,588/34,588 us 🔴 -5.5% / 🔴 +122.0%
bs=100 sw=10 sl=64 791 0.483 123,662/157,465/157,465 us ⚪ within ±5% / 🔴 +46.8%
bs=1000 sw=10 sl=64 928 0.566 1,078,004/1,136,247/1,136,247 us ⚪ within ±5% / 🔴 +11.1%
Baseline details

Latest main 70c2114 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 378 tuples/sec 400 tuples/sec 787.98 tuples/sec -5.5% -52.0%
bs=10 sw=10 sl=64 MB/s 0.231 MB/s 0.244 MB/s 0.481 MB/s -5.3% -52.0%
bs=10 sw=10 sl=64 p50 25,332 us 24,686 us 12,593 us +2.6% +101.2%
bs=10 sw=10 sl=64 p95 34,588 us 34,667 us 15,579 us -0.2% +122.0%
bs=10 sw=10 sl=64 p99 34,588 us 34,667 us 18,786 us -0.2% +84.1%
bs=100 sw=10 sl=64 throughput 791 tuples/sec 800 tuples/sec 1,008 tuples/sec -1.1% -21.5%
bs=100 sw=10 sl=64 MB/s 0.483 MB/s 0.488 MB/s 0.615 MB/s -1.0% -21.5%
bs=100 sw=10 sl=64 p50 123,662 us 121,171 us 100,701 us +2.1% +22.8%
bs=100 sw=10 sl=64 p95 157,465 us 162,898 us 107,244 us -3.3% +46.8%
bs=100 sw=10 sl=64 p99 157,465 us 162,898 us 116,122 us -3.3% +35.6%
bs=1000 sw=10 sl=64 throughput 928 tuples/sec 926 tuples/sec 1,042 tuples/sec +0.2% -10.9%
bs=1000 sw=10 sl=64 MB/s 0.566 MB/s 0.565 MB/s 0.636 MB/s +0.2% -11.0%
bs=1000 sw=10 sl=64 p50 1,078,004 us 1,080,273 us 981,959 us -0.2% +9.8%
bs=1000 sw=10 sl=64 p95 1,136,247 us 1,151,371 us 1,023,080 us -1.3% +11.1%
bs=1000 sw=10 sl=64 p99 1,136,247 us 1,151,371 us 1,051,697 us -1.3% +8.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,528.67,200,128000,378,0.231,25331.69,34587.90,34587.90
1,100,10,64,20,2528.05,2000,1280000,791,0.483,123661.73,157465.42,157465.42
2,1000,10,64,20,21562.54,20000,12800000,928,0.566,1078004.06,1136247.40,1136247.40

@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:10
@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): compare table row counts feat(pyamber): compare table row counts 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.

Tables with different row counts compare equal

5 participants