Skip to content

[CALCITE-7642] RelToSqlConverter may generate duplicate output column names for case-insensitive dialects#5077

Open
zzwqqq wants to merge 1 commit into
apache:mainfrom
zzwqqq:fix_rel2sql_case_aliases
Open

[CALCITE-7642] RelToSqlConverter may generate duplicate output column names for case-insensitive dialects#5077
zzwqqq wants to merge 1 commit into
apache:mainfrom
zzwqqq:fix_rel2sql_case_aliases

Conversation

@zzwqqq

@zzwqqq zzwqqq commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7642

Changes Proposed

RelToSqlConverter may emit duplicate output column names for case-insensitive dialects, for example id and ID.

Row type field names are uniquified according to the type factory, which may not match the target SQL dialect's case-sensitivity.

This patch uses the dialect's case-sensitivity when uniquifying output field names, and keeps the affected SELECT-list generation paths on the same aliasing logic.

Adds regression tests.

@sonarqubecloud

sonarqubecloud Bot commented Jul 5, 2026

Copy link
Copy Markdown

@xiedeyantu

Copy link
Copy Markdown
Member

I added a comment in jira.

@zzwqqq

zzwqqq commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

I added a comment in jira.

@xiedeyantu Thanks for reviewing. I replied on the JIRA issue with a more precise description.

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