LuciferYang opened a new issue, #13717:
URL: https://github.com/apache/gluten/issues/13717

   A legacy group window query (`GROUP BY TUMBLE(...)`, `HOP(...)` or 
`SESSION(...)`) is translated by the Gluten copy of 
`StreamExecGroupWindowAggregate`, which never reads the `LogicalWindow`. It 
passes size, slide and offset 0 and window type 1 to 
`StreamWindowPartitionFunctionSpec`, and `isEventTime = true` and window type 1 
to `GroupWindowAggregationNode` (all marked TODO).
   
   The native side doesn't read them either. In bigo-sg/velox at the commit 
velox4j pins (5c907ef6), 
`StatefulPlanner::transformGroupWindowAggregationOperator` builds the 
`SliceAssigner` with size, step and offset 0 and always uses 
`SessionWindowAssigner(10, ...)` ("TODO: support window parameters"). So every 
legacy group window, tumbling or hopping included, becomes a session window 
with a gap of 10, whatever the query asks for, and the job reports no error. 
Nexmark q11 (`SESSION(dateTime, INTERVAL '10' SECOND)`) runs this path in 
`NexmarkTest`, but its sink is a blackhole, so the results aren't checked.
   
   Window TVF queries (`TUMBLE(TABLE ...)`) take a different path that does 
read the window parameters (`WindowUtils.extractWindowParameters`).
   
   A complete fix needs the parameters in both places. Until the native 
operator supports them, failing the translation with a clear "not supported" 
error, or leaving these queries on Flink's own operator, would avoid wrong 
results. I'd like to hear which the gluten-flink maintainers prefer before 
sending a patch.
   
   This issue was written with the assistance of AI (Claude Opus).
   


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