Skip to content

[FLINK-39731][table] Port from Calcite fix for SqlValidatorImpl should reject MATCH_RECOGNIZE with duplicate MEASURE#28227

Merged
snuyanzin merged 1 commit into
apache:masterfrom
snuyanzin:flink39731
May 22, 2026
Merged

[FLINK-39731][table] Port from Calcite fix for SqlValidatorImpl should reject MATCH_RECOGNIZE with duplicate MEASURE#28227
snuyanzin merged 1 commit into
apache:masterfrom
snuyanzin:flink39731

Conversation

@snuyanzin
Copy link
Copy Markdown
Contributor

What is the purpose of the change

The PR ports fix from Calcite for MATCH_RECOGNIZE validation

Brief change log

SqlValidatorImpl

Verifying this change

Test also provided

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? (no)
  • If yes, how is the feature documented? (not applicable)

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

…uld reject `MATCH_RECOGNIZE` with duplicate `MEASURE`
final String alias = SqlValidatorUtil.alias(measure, aliases.size());
aliases.add(alias);

if (!aliases.add(alias)) {
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.

port from apache/calcite@16c2b1c

Porting of CalciteResource is overkill, so for now just hardcoded message in exception.

Will be replaced with Calcite upgrade

Copy link
Copy Markdown
Contributor

@liuyongvs liuyongvs left a comment

Choose a reason for hiding this comment

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

LGTM +1

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented May 22, 2026

CI report:

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

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label May 22, 2026
@snuyanzin
Copy link
Copy Markdown
Contributor Author

thanks for taking a look?

@snuyanzin snuyanzin merged commit 92ec61e into apache:master May 22, 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.

3 participants