Skip to content

[CALCITE-7538] SqlValidatorImpl should reject MATCH_RECOGNIZE with duplicate MEASURE alias#4952

Merged
snuyanzin merged 1 commit into
apache:mainfrom
snuyanzin:calcite7538
May 22, 2026
Merged

[CALCITE-7538] SqlValidatorImpl should reject MATCH_RECOGNIZE with duplicate MEASURE alias#4952
snuyanzin merged 1 commit into
apache:mainfrom
snuyanzin:calcite7538

Conversation

@snuyanzin
Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7538

Changes Proposed

The PR makes validator (SqlValidatorImpl) rejecting sql with duplicate aliases in MEASURE for MATCH_RECOGNIZE

sql(expected11)
.withParserConfig(c -> c.withQuoting(Quoting.BACK_TICK)).ok();

// Test cases for [CALCITE-7538] https://issues.apache.org/jira/browse/CALCITE-7538
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.

Can you add a test with different case and one with quoted identifiers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, added

@sonarqubecloud
Copy link
Copy Markdown

@snuyanzin
Copy link
Copy Markdown
Contributor Author

squashed and rebased

@snuyanzin snuyanzin merged commit 16c2b1c into apache:main May 22, 2026
19 checks passed
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