Skip to content

[Dataflow Streaming] [MultiKey] Enable combiner lifting when multi-key bundle experiment is enabled - #41658

Merged
reuvenlax merged 1 commit into
apache:masterfrom
arunpandianp:enable_combiner_lifting_multikey
Nov 25, 2026
Merged

reuvenlax merged 1 commit into
apache:masterfrom
arunpandianp:enable_combiner_lifting_multikey

Conversation

@arunpandianp

Copy link
Copy Markdown
Contributor

No description provided.

…y bundle experiment is enabled

In Dataflow streaming mode, combiner lifting on GroupByKey was previously restricted to transforms with fewKeys because single-key bundles rarely have repeated destination keys. When unstable_enable_multi_key_bundle is enabled, bundles process multiple keys together, making mapper-side combiner lifting beneficial for per-key combines as well.

This change:
- Defines UNSTABLE_ENABLE_MULTI_KEY_BUNDLE in DataflowStreamingPipelineOptions and reuses it from MultiKeyBundleOptions.
- Allows combiner lifting in DataflowPipelineTranslator for streaming GroupByKey when transform.fewKeys() or unstable_enable_multi_key_bundle is set, while preserving non-merging window, single-window assignment, and trigger compatibility checks.
- Adds unit tests in DataflowPipelineTranslatorTest covering default streaming behavior, multi-key enabled per-key combines, and incompatible triggers/windows.
@arunpandianp

Copy link
Copy Markdown
Contributor Author

R: @reuvenlax

@github-actions github-actions Bot added runners dataflow size/m M: 50-249 lines changed labels Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR enables combiner lifting for per-key GroupByKey transforms in Dataflow streaming pipelines when the unstable_enable_multi_key_bundle experiment is enabled, while preserving existing windowing and trigger compatibility checks. The constant is cleanly shared via DataflowStreamingPipelineOptions and the translator behavior is well covered by new unit tests.

🔍 General Feedback

  • Moving UNSTABLE_ENABLE_MULTI_KEY_BUNDLE to DataflowStreamingPipelineOptions and referencing it from MultiKeyBundleOptions cleanly avoids duplicate string literals across the runner and worker modules.
  • The unit tests in DataflowPipelineTranslatorTest thoroughly cover default streaming behavior, compatible triggers with the multi-key bundle experiment, and incompatible triggers/window functions (count triggers, merging windows, and multi-window assignments).

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@reuvenlax

Copy link
Copy Markdown
Contributor

lgtm

@reuvenlax
reuvenlax merged commit 0f42ae2 into apache:master Nov 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dataflow runners size/m M: 50-249 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants