Skip to content

FLINK-XXXXX: add GROUP BY <int literal>, GROUP BY ALL, ORDER BY ALL support#28330

Draft
tisyabhatia wants to merge 2 commits into
apache:masterfrom
tisyabhatia:FLINK-XXXXX-group-by-all
Draft

FLINK-XXXXX: add GROUP BY <int literal>, GROUP BY ALL, ORDER BY ALL support#28330
tisyabhatia wants to merge 2 commits into
apache:masterfrom
tisyabhatia:FLINK-XXXXX-group-by-all

Conversation

@tisyabhatia
Copy link
Copy Markdown

What is the purpose of the change

This pull request adds initial support for GROUP BY ALL in Flink SQL.

The change introduces parser and validator support for GROUP BY ALL, adds planner handling behind a configuration flag, and includes parser and batch planner test coverage. The implementation is intentionally scoped and does not attempt to support all related variants yet.

This work is also backed by an internal design doc and FLIP draft.

Brief change log

  • Add parser support for GROUP BY ALL
  • Add a SqlGroupByAllOperator representation for parsing and validation
  • Extend validator logic to recognize and rewrite GROUP BY ALL
  • Add a table config option / feature flag for the behavior
  • Add parser tests for GROUP BY ALL
  • Add batch planner tests for GROUP BY ALL

Verifying this change

This change added tests and can be verified as follows:

  • Added parser coverage in FlinkSqlParserImplTest
  • Added batch planner coverage in GroupByAllTest
  • Manually verified the parser / validator / planner flow for GROUP BY ALL
  • Verified the change is gated by the corresponding table config option

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? not documented in this PR yet; design details are currently captured in the internal design doc and FLIP draft

Was generative AI tooling used to co-author this PR?
  • Yes

Generated-by: Glean

@tisyabhatia tisyabhatia marked this pull request as draft June 5, 2026 17:49
@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Jun 5, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@tisyabhatia tisyabhatia changed the title FLINK-XXXXX: add GROUP BY ALL support FLINK-XXXXX: add GROUP BY <int literal>, GROUP BY ALL, ORDER BY ALL support Jun 5, 2026
Comment on lines +2600 to +2601
SqlParserPos pos;
List<SqlNode> res;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the reason of this change?
We should not touch this file

we should only put here backports from Calcite and nothing more

Copy link
Copy Markdown
Contributor

@snuyanzin snuyanzin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not change Parser.jj.

If you need to change anything in this file then

  1. Submit a fix to Calcite
  2. once it is merged, backport to Parser.jj

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants