Skip to content

[CALCITE-7934] Aggregate uniqueness metadata uses incorrect column ordinals - #5413

Open
npaincomplet wants to merge 1 commit into
apache:mainfrom
npaincomplet:CALCITE-7934-aggregate-uniqueness-ordinals
Open

npaincomplet wants to merge 1 commit into
apache:mainfrom
npaincomplet:CALCITE-7934-aggregate-uniqueness-ordinals

Conversation

@npaincomplet

@npaincomplet npaincomplet commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7934

Changes Proposed

  • Fix RelMdColumnUniqueness.areColumnsUnique by mapping Aggregate output columns to the corresponding input columns.
  • Fix RelMdUniqueKeys.getUniqueKeys by mapping input unique keys to Aggregate output positions.
  • Add metadata and Quidem tests covering incorrect rewrites.

@sonarqubecloud

Copy link
Copy Markdown

@mihaibudiu

Copy link
Copy Markdown
Contributor

@PaulJackson123 you seem to have written this code, are you available to provide a review?

@asolimando

Copy link
Copy Markdown
Member

@PaulJackson123 you seem to have written this code, are you available to provide a review?

If Paul is not available, I can review sometime next week (I have reviewed similar changes and I am familiar with this family of bugs where index remapping is not taken into account), but if anyone has time before then, they are welcome to review!

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.

3 participants