[ 
https://issues.apache.org/jira/browse/FLINK-38750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18042129#comment-18042129
 ] 

Gyula Komlossi commented on FLINK-38750:
----------------------------------------

Thanks for fixing this [~Sergey Nuyanzin] . I've recently run into this issue 
on a Flink 1.20 deployment, and because of the size of the SQL job, it was 
really tough to spot where the problem comes from.
Do you think it can be backported to release-1.20?

I've opened a PR for it:
https://github.com/apache/flink/pull/27300

> Validation of queries with functions erroneously invoked under select fails 
> with StackOverflow
> ----------------------------------------------------------------------------------------------
>
>                 Key: FLINK-38750
>                 URL: https://issues.apache.org/jira/browse/FLINK-38750
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: Sergey Nuyanzin
>            Assignee: Sergey Nuyanzin
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.3.0
>
>
> Example of such queries leading to {{StackOverflow}}
> {code:sql}
> SELECT coalesce(SELECT invalid);
> {code}
> {code:sql}
> SELECT coalesce(SELECT coalesce(SELECT invalid));
> {code}
> {noformat}
> java.lang.StackOverflowError
>       at 
> org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:1120)
>       at 
> org.apache.calcite.sql.validate.AbstractNamespace.getRowType(AbstractNamespace.java:119)
>       at 
> org.apache.calcite.sql.validate.SelectNamespace.getRowType(SelectNamespace.java:32)
>       at 
> org.apache.calcite.sql.validate.AbstractNamespace.getType(AbstractNamespace.java:130)
>       at 
> org.apache.calcite.sql.validate.SelectNamespace.getType(SelectNamespace.java:32)
>       at 
> org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:1123)
>       at 
> org.apache.calcite.sql.validate.AbstractNamespace.getRowType(AbstractNamespace.java:119)
>       at 
> org.apache.calcite.sql.validate.SelectNamespace.getRowType(SelectNamespace.java:32)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to