[ https://issues.apache.org/jira/browse/FLINK-34446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Nuyanzin resolved FLINK-34446. ------------------------------------- Fix Version/s: 2.0.0 Resolution: Fixed > SqlValidatorException with LATERAL TABLE and JOIN > ------------------------------------------------- > > Key: FLINK-34446 > URL: https://issues.apache.org/jira/browse/FLINK-34446 > Project: Flink > Issue Type: Bug > Components: Table SQL / Ecosystem, Table SQL / Planner > Reporter: Jing Ge > Assignee: Sergey Nuyanzin > Priority: Critical > Labels: pull-request-available > Fix For: 2.0.0 > > > 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)