wud-if opened a new pull request, #13742:
URL: https://github.com/apache/gluten/pull/13742

   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 a `StreamWindowJoinNode`. 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_trunc` for natural units, 
modulo-floor for arbitrary sizes); aligned HOP (slide divides size, offset null 
or zero — null means zero here) routes to the new `HopExpandNode`; SESSION 
routes to `SessionExpandNode`. 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.
   - Runtime: `GlutenStatefulRecordSerializer` exchanges StatefulRecords as 
presto-frame bytes between all-gluten vertices; `GlutenTwoInputOperator` 
carries the two-input watermark path.
   
   ### How was this patch tested?
   
   - `gluten-flink/ut`: `WindowJoinPlannerNegativePathTest` (fail-loud routing 
for unsupported shapes) 2/2; `UtilsJoinTypeMappingTest`, `DataPathMillisProbe` 
pass.
   - Functional dual-run at 100k events (nexmark, filesystem sink): offloaded 
row counts match native within the generators' RNG variance — TUMBLE 19838 vs 
19844, HOP exactly 2.0x, SESSION equal to TUMBLE.
   - End-to-end dual-run benchmarks (nexmark, 8-way parallelism, identical SQL 
at `/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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to