[ 
https://issues.apache.org/jira/browse/FLINK-34446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeyhun Karimov updated FLINK-34446:
-----------------------------------
    Description: 
found one regression issue. Query working Flink 1.17.2, but failing with Flink 
1.18.+

 
{code:java}
-- Query working Flink 1.17.2, but failing with Flink 1.18.+

-- -- [ERROR] Could not execute SQL statement. Reason:

-- -- org.apache.calcite.sql.validate.SqlValidatorException: Table 's' not found

SELECT * FROM sample as s,
LATERAL TABLE(split(s.id,'[01]'))
CROSS JOIN (VALUES ('A'), ('B'));
{code}

The problem is not related to the the alias scope. Even if we replace 
split(s.id.. ) with split(id,...) the error

{code:java}
Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Column 'id' 
not found in any table
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
{code}

will be generated. This seems to be Calcite issue, since this test fails on 
Calcite v1.32 and does not fail on Calcite 1.29.0 and 1.30.0.
We tested it with Calcite versions 1.31.0, 1.32.0, 1.33.0, 1.34.0, 1.35.0, 
1.36.0 and the main branch (c774c313a81d01c4e3e77cf296d04839c5ab04c0). The 
issue still remains

  was:
found one regression issue. Query working Flink 1.17.2, but failing with Flink 
1.18.+

 
{code:java}
-- Query working Flink 1.17.2, but failing with Flink 1.18.+

-- -- [ERROR] Could not execute SQL statement. Reason:

-- -- org.apache.calcite.sql.validate.SqlValidatorException: Table 's' not found

SELECT * FROM sample as s,
LATERAL TABLE(split(s.id,'[01]'))
CROSS JOIN (VALUES ('A'), ('B'));
{code}

The problem is not related to the the alias scope. Even if we replace 
split(s.id.. ) with split(id,...) the error

{code:java}
Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Column 'id' 
not found in any table
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
{code}

will be generated. This seems to be Calcite issue, since this test fails on 
Calcite v1.32 and does not fail on Calcite v1.29.
We tested it with Calcite versions calcite-1.32.0, calcite-1.33.0, 
calcite-1.34.0, calcite-1.35.0, calcite-1.36.0 and the main branch 
(c774c313a81d01c4e3e77cf296d04839c5ab04c0). The issue still remains


> SqlValidatorException with LATERAL TABLE and JOIN
> -------------------------------------------------
>
>                 Key: FLINK-34446
>                 URL: https://issues.apache.org/jira/browse/FLINK-34446
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Jing Ge
>            Assignee: Jeyhun Karimov
>            Priority: Critical
>
> found one regression issue. Query working Flink 1.17.2, but failing with 
> Flink 1.18.+
>  
> {code:java}
> -- Query working Flink 1.17.2, but failing with Flink 1.18.+
> -- -- [ERROR] Could not execute SQL statement. Reason:
> -- -- org.apache.calcite.sql.validate.SqlValidatorException: Table 's' not 
> found
> SELECT * FROM sample as s,
> LATERAL TABLE(split(s.id,'[01]'))
> CROSS JOIN (VALUES ('A'), ('B'));
> {code}
> The problem is not related to the the alias scope. Even if we replace 
> split(s.id.. ) with split(id,...) the error
> {code:java}
> Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Column 'id' 
> not found in any table
>       at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>  Method)
>       at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>       at 
> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>       at 
> java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
> {code}
> will be generated. This seems to be Calcite issue, since this test fails on 
> Calcite v1.32 and does not fail on Calcite 1.29.0 and 1.30.0.
> We tested it with Calcite versions 1.31.0, 1.32.0, 1.33.0, 1.34.0, 1.35.0, 
> 1.36.0 and the main branch (c774c313a81d01c4e3e77cf296d04839c5ab04c0). The 
> issue still remains



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

Reply via email to