Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15593

Calcite. Fail on inner join on non-equality subquery.

    XMLWordPrintableJSON

Details

    Description

      statement ok
      CREATE TABLE integers(i INTEGER)
      
      statement ok
      INSERT INTO integers VALUES (1), (2), (3), (NULL)
      
      query II
      SELECT * FROM integers s1 INNER JOIN integers s2 ON (SELECT s1.i=s2.i) ORDER BY s1.i;
      ----
      1	1
      2	2
      3	3
      
      /subquery/scalar/test_complex_correlated_subquery.test[_ignore]
      
      org.apache.calcite.runtime.CalciteContextException: From line 1, column 54 to line 1, column 69: ON clause must be a condition
      
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:506)
      	at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:917)
      	at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:902)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: