Add streaming shared subplan example - #24780
Open
nathanb9 wants to merge 6 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24780 +/- ##
==========================================
- Coverage 81.53% 81.52% -0.01%
==========================================
Files 1123 1123
Lines 406102 406148 +46
Branches 406102 406148 +46
==========================================
- Hits 331111 331110 -1
- Misses 55628 55667 +39
- Partials 19363 19371 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nathanb9
marked this pull request as ready for review
August 30, 2026 19:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
motivation
how the example works
HashJoinExecis marked as a shared subplan with an ID.StreamingFanoutExecand oneStreamingFanoutReaderExecper consumer.StreamingFanoutExecexecutes each input partition once and creates a bounded output lane for every(consumer, partition)pair.RecordBatcharrives, it is sent to every consumer's lane usingRecordBatchReceiverStreamBuilder.StreamingFanoutReaderExecselects the lanes belonging to its consumer. Reader 0 exposes the fan-out as itsphysical child; the other reader accesses the same fan-out through a shared
Arc.extension points used
StreamingShareNodeimplements [UserDefinedLogicalNodeCore] and marks a logical subplan with a stable sharing ID.StreamingShareQueryPlannerimplements [QueryPlanner] and installsStreamingShareExtensionPlanner, an [ExtensionPlanner] that converts the logical marker into a temporaryStreamingShareMarkerExec.RewriteStreamingSharesimplements [PhysicalOptimizerRule]. It counts consumers and replaces the temporary markers with one fan-out and one reader per consumer.StreamingFanoutStateandFanoutPartitionare example-only runtime helpers. They use [RecordBatchReceiverStreamBuilder] for bounded streams and [SpawnedTask] to run each input partition once.diagrammed from example in issue: #8777