Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-34446

SqlValidatorException with LATERAL TABLE and JOIN

    XMLWordPrintableJSON

Details

    Description

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

       

      -- 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'));
      

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

      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)
      

      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

      Attachments

        Issue Links

          Activity

            People

              Sergey Nuyanzin Sergey Nuyanzin
              jingge Jing Ge
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: