[FLINK] Legacy group window aggregation ignores the window size, slide and type

Abierto
#13,717 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
22/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp, java, scala

Línea de trabajo

Start with the Gluten copy of StreamExecGroupWindowAggregate, which passes hard-coded size, slide, offset and window type instead of reading the LogicalWindow, and with GroupWindowAggregationNode. The native side is StatefulPlanner::transformGroupWindowAggregationOperator in the velox4j pinned commit, which always builds SessionWindowAssigner(10). Done means the parameters reach both places or the translation fails with a clear not-supported error, and a test checks tumble, hop and session results, not just that the job runs.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Scala
Estrellas
1.6k
Forks
685
Merge medio
4 d 16 h
PR fusionados (30 d)
84

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/gluten

Todos los issues de apache/gluten

Issues similares

Más issues de Scala

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.