Skip to content

feat(workflow-operator): export the relational and sampling operators - #8506

Draft
kz930 wants to merge 1 commit into
apache:mainfrom
kz930:feat/standalone-relational-and-sampling
Draft

feat(workflow-operator): export the relational and sampling operators#8506
kz930 wants to merge 1 commit into
apache:mainfrom
kz930:feat/standalone-relational-and-sampling

Conversation

@kz930

@kz930 kz930 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Sixteen operators implement StandaloneCodeGenerator: the three joins, the three set operations, Aggregate, the sort family, Split, the two samplers, and If, Dummy and Sleep. What they have in common is that they rearrange rows rather than read what is inside one.

The samplers need more than a pandas expression. A sampler decides per row whether to keep it, so which rows survive is fixed by the exact sequence java.util.Random produces; seeding Python's own generator with the same number selects a different set, and the script would then report a different sample than the workflow it came from. SamplingHelpers transcribes the generator, and the three operators that draw from one emit it once per script.

#8340 keeps the operators that work on text, and the cast transcription they share.

Any related issues, documentation, discussions?

Part of #8325, 11 of 27; that issue lists the set in order.

Closes #8505, the task this change is the whole of.

How was this PR tested?

Each operator asserts the block it emits in its own spec. The joins carry the cases a review found: a hash join whose left frame already holds the probe key's name drops the renamed right key rather than the left payload, and an interval join reads its keys off the merged frame rather than writing over an input column that happens to share a temporary's name.

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

Generated-by: Claude Code (Claude Opus 5)

🤖 Generated with Claude Code

Seventeen operators implement the trait: the three joins, the three set
operations, Aggregate, the sort family, Split, the two samplers, and If,
Dummy and Sleep. What they have in common is that they rearrange rows
rather than read what is inside one.

A sampler decides per row whether to keep it, so which rows survive is
fixed by the exact sequence java.util.Random produces. Seeding Python's
own generator selects a different set, and the script would then report a
different sample than the workflow it came from, so SamplingHelpers
transcribes the generator rather than approximating it.

Split out of apache#8340 on review, which had grown past what one reading can
hold. That change keeps the operators that work on text, and the cast
transcription they share.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@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: @Yicong-Huang, @aglinxinyuan, @tanishqgandhi1908
    You can notify them by mentioning @Yicong-Huang, @aglinxinyuan, @tanishqgandhi1908 in a comment.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Arrow Flight E2E bench

(no arrow-flight-e2e.csv in artifact)

Full dashboard · Workflow run

@codecov-commenter

codecov-commenter commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.69%. Comparing base (1fbd346) to head (85997d8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8506      +/-   ##
============================================
- Coverage     93.69%   93.69%   -0.01%     
+ Complexity     4826     4810      -16     
============================================
  Files          1209     1209              
  Lines         49871    49855      -16     
  Branches       6099     6099              
============================================
- Hits          46727    46711      -16     
  Misses         1652     1652              
  Partials       1492     1492              
Flag Coverage Δ *Carryforward flag
access-control-service 80.18% <ø> (ø)
agent-service 99.32% <ø> (ø) Carriedforward from 1fbd346
amber 89.91% <ø> (-0.01%) ⬇️ Carriedforward from 1fbd346
computing-unit-managing-service 77.14% <ø> (ø)
config-service 87.12% <ø> (ø)
file-service 83.65% <ø> (ø)
frontend 96.16% <ø> (ø) Carriedforward from 1fbd346
notebook-migration-service 83.73% <ø> (ø)
pyamber 98.47% <ø> (ø) Carriedforward from 1fbd346
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 1fbd346

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export the relational and sampling operators as Python

2 participants