Repository navigation
Conversation
- StreamExecJoin/StreamExecWindowJoin: window-join routing with window_end detection, tautological condition drop enabling the native fast cross-product path, window_start key pruning - StreamExecWindowTableFunction: velox projection for aligned unit-size TUMBLE windows; velox expand routing for aligned HOP (slide divides size, null offset) and SESSION windows; unit-TUMBLE TVF dissolution into the downstream Calc projection
This branch has not been deployed
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.
Fixes #13741
What changes are proposed in this pull request?
Planner-side routing so a Flink window join and its window TVFs offload to the velox stateful stack (bigo-sg/velox#107 adds the operators):
StreamExecWindowJoin: detects the window bounds of both inputs and routes to aStreamWindowJoinNode. When the join is INNER and the planner-extracted condition is pure key equality (the window equality conjuncts are tautologies once both inputs share the window spec), the probe condition is dropped entirely — this unlocks the native zero-copy dictionary cross-product and is the single largest win: the 1e8 nexmark canonical drops from 74.7 s to 38.5 s.StreamExecWindowTableFunction: three-tier routing — aligned unit-size TUMBLE compiles to a velox projection (date_truncfor natural units, modulo-floor for arbitrary sizes); aligned HOP (slide divides size, offset null or zero — null means zero here) routes to the newHopExpandNode; SESSION routes toSessionExpandNode. Everything else falls back to the stock JVM translation.StreamExecJoin: window detection and tautology drop for FLOOR-shaped joins, plus window_start key pruning (window_start is determined by window_end, so the shuffle key narrows from (key…, ws, we) to (key…, we)).StreamExecCalc: unit-TUMBLE TVFs dissolve into the downstream Calc projection, removing an operator hop.GlutenStatefulRecordSerializerexchanges StatefulRecords as presto-frame bytes between all-gluten vertices;GlutenTwoInputOperatorcarries the two-input watermark path.How was this patch tested?
gluten-flink/ut:WindowJoinPlannerNegativePathTest(fail-loud routing for unsupported shapes) 2/2;UtilsJoinTypeMappingTest,DataPathMillisProbepass./root/gfv/e2e/sql/windowjoin-*.sql): 1e7 TUMBLE 3.9 s vs 7.3 s, HOP 6.4 s vs 8.5 s, SESSION 11.3 s vs 19.0 s; 1e8 TUMBLE 38.7 s vs 66.0 s, HOP 67.7 s and SESSION 173.0 s complete where native fails with TaskManager heartbeat overload.