Skip to content

Route legacy group windows (GROUP BY TUMBLE/HOP) onto the native window operators #9

Description

@jordepic

What

The legacy group-window syntax — GROUP BY TUMBLE(ts, INTERVAL '1' MINUTE) / HOP(...) — plans as GroupWindowAggregate, which has no native path today, so any query using it falls back to stock Flink entirely. The syntax is deprecated in favor of the windowing TVFs, but enormous amounts of existing Flink SQL still use it, which makes this the best effort-to-coverage ratio among the remaining whole-operator gaps.

The template already exists

A legacy event-time SESSION(...) group window already routes natively by reusing the session window operator (see the exception in docs/coverage-and-fallbacks.md §a). The work is the same mapping for TUMBLE/HOP: recognize the legacy plan shape, translate its window spec and window-property outputs (window_start / window_end / rowtime / proctime — the property-order constraint the SESSION path already enforces) onto the existing native tumbling/hopping window aggregate operators. Proctime legacy group windows can reuse the processing-time-timer path the TVF windows already have.

Scope notes

  • Same aggregate/type support as the TVF-planned window aggregates — the operators are shared. No new native operator expected; this is matcher/exec-node translation work.
  • Legacy windows have semantics quirks vs TVF windows (the allowed-lateness API, early/late fire configs). Those configs are off by default — decline them rather than modelling them.
  • GroupWindowTableAggregate (a TableAggregateFunction inside a legacy window) stays out of scope — that's the UDAF question, not a window question.

Acceptance

  • Parity harness runs the same query in legacy and TVF syntax and both match stock Flink.
  • The GroupWindowAggregate row in docs/coverage-and-fallbacks.md updated in the same commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions