Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FLINK-38750][table] Validation of queries with functions erroneously invoked underSELECT fails withStackOverflow#27287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
snuyanzin wants to merge1 commit intoapache:master
base:master
Choose a base branch
Loading
fromsnuyanzin:flink38750

Conversation

@snuyanzin
Copy link
Contributor

@snuyanzinsnuyanzin commentedNov 28, 2025
edited
Loading

What is the purpose of the change

The PR is to fixStackOverflow for queries like

SELECT coalesce(SELECT invalid);

Brief change log

The way howStackOverflow appears:

  1. Validation reachedSqlValidatorImpl#validateNamespace
  2. At some point deeper in stack it reachesSqlValidatorImpl#inferUnknownTypes
  3. In case of functions (in this casecoalesce) it invokes Flink'sTypeInferenceOperandInference#inferOperandTypes
  4. Then deeper it fails inDelegatingScope#fullyQualify withColumn 'invalid' not found in any table
  5. Now the problem is that this failure is swallowed in bullet 3.
  6. Thus instead of failing the whole validation it continues endlessly failing and swallowing the error.

Verifying this change

There are tests added

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)

… invoked under select fails with StackOverflow
@flinkbot
Copy link
Collaborator

flinkbot commentedNov 28, 2025
edited
Loading

CI report:

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

@snuyanzinsnuyanzin changed the title[FLINK-38750][table] Validation of queries with functions erroneously invoked under select fails with StackOverflow <!--[FLINK-38750][table] Validation of queries with functions erroneously invoked under select fails with StackOverflowNov 28, 2025
@snuyanzinsnuyanzin changed the title[FLINK-38750][table] Validation of queries with functions erroneously invoked under select fails with StackOverflow[FLINK-38750][table] Validation of queries with functions erroneously invoked underSELECT fails with StackOverflowNov 28, 2025
@snuyanzinsnuyanzin changed the title[FLINK-38750][table] Validation of queries with functions erroneously invoked underSELECT fails with StackOverflow[FLINK-38750][table] Validation of queries with functions erroneously invoked underSELECT fails withStackOverflowNov 28, 2025
Comment on lines +83 to 84
}catch (ValidationExceptione) {
// let operand checker fail
Copy link
ContributorAuthor

@snuyanzinsnuyanzinNov 29, 2025
edited
Loading

Choose a reason for hiding this comment

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

rethrowing here asValidationException will not help for complex cases and will lead again toStackOverflow: first it rethrows asValidationException and then swallows.

For that reason there istestNestedCoalesceOnInvalidField highlighting this case with a query

SELECT coalesce(SELECT coalesce(SELECT coalesce(invalid)))

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@snuyanzin@flinkbot

[8]ページ先頭

©2009-2025 Movatter.jp