Skip to content

[CALCITE-7675] Exclude constant literals from GROUP BY ALL / ORDER BY ALL keys - #5127

Open
tisyabhatia wants to merge 2 commits into
apache:mainfrom
tisyabhatia:calcite-group-order-by-all-exclude-literals
Open

[CALCITE-7675] Exclude constant literals from GROUP BY ALL / ORDER BY ALL keys#5127
tisyabhatia wants to merge 2 commits into
apache:mainfrom
tisyabhatia:calcite-group-order-by-all-exclude-literals

Conversation

@tisyabhatia

@tisyabhatia tisyabhatia commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Follow-up to CALCITE-7594 / CALCITE-7597. GROUP BY ALL / ORDER BY ALL expanded every non-aggregate SELECT expression into the implicit keys, including bare constant literals — so e.g. SELECT count(*), 42 ... GROUP BY ALL materialized GROUP BY 42, which re-parses as an out-of-range ordinal on the view / materialized-table unparse round-trip. Excludes SqlLiteral keys (grouping/sorting by a constant is a no-op; only bare literals, not compound constant expressions). Adds rewritesTo tests. See CALCITE-7675.

@mihaibudiu

Copy link
Copy Markdown
Contributor

I guess you did not read the comment I left on the issue

@tisyabhatia tisyabhatia changed the title [CALCITE-7676] Exclude constant literals from GROUP BY ALL / ORDER BY ALL keys [CALCITE-7675] Exclude constant literals from GROUP BY ALL / ORDER BY ALL keys Aug 3, 2026
@tisyabhatia
tisyabhatia force-pushed the calcite-group-order-by-all-exclude-literals branch from 7b178b7 to 5e4cae7 Compare August 3, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants