- Notifications
You must be signed in to change notification settings - Fork13.8k
[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
base:master
Are you sure you want to change the base?
Conversation
… invoked under select fails with StackOverflow
flinkbot commentedNov 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
SELECT fails with StackOverflowSELECT fails with StackOverflowSELECT fails withStackOverflow| }catch (ValidationExceptione) { | ||
| // let operand checker fail |
snuyanzinNov 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
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)))
Uh oh!
There was an error while loading.Please reload this page.
What is the purpose of the change
The PR is to fix
StackOverflowfor queries likeBrief change log
The way how
StackOverflowappears:SqlValidatorImpl#validateNamespaceSqlValidatorImpl#inferUnknownTypescoalesce) it invokes Flink'sTypeInferenceOperandInference#inferOperandTypesDelegatingScope#fullyQualifywithColumn 'invalid' not found in any tableVerifying this change
There are tests added
Does this pull request potentially affect one of the following parts:
@Public(Evolving): ( no)Documentation