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

JOIN with USING with common column names failed.

    XMLWordPrintableJSON

Details

    Description

      statement ok
      CREATE TABLE t1 (a INTEGER, b INTEGER, c INTEGER)
      
      statement ok
      INSERT INTO t1 VALUES (1,2,3)
      
      statement ok
      CREATE TABLE t2 (a INTEGER, b INTEGER, c INTEGER)
      
      statement ok
      INSERT INTO t2 VALUES (1,2,3), (2,2,4), (1,3,4)
      
      query I
      SELECT a+1 FROM t1 JOIN t2 USING(a) ORDER BY a
      ----
      2
      2
      

      failed with

      org.apache.calcite.runtime.CalciteContextException: At line 1, column 46: Column 'A' is ambiguous
      
      	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)
      
      /join/inner/test_using_join.test[_ignore]
      

      checked with mysql - all ok there.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: