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

Calcite. Natural join returns empty resultset.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • sql

    Description

      statement ok
      CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER);
      
      statement ok
      CREATE TABLE t2(b INTEGER, c INTEGER, d INTEGER);
      
      statement ok
      INSERT INTO t1 VALUES(1,2,3);
      
      statement ok
      INSERT INTO t1 VALUES(2,3,4);
      
      statement ok
      INSERT INTO t1 VALUES(3,4,5);
      
      statement ok
      INSERT INTO t2 VALUES(1,2,3);
      
      statement ok
      INSERT INTO t2 VALUES(2,3,4);
      
      statement ok
      INSERT INTO t2 VALUES(3,4,5);
      
      query III rowsort
      SELECT t2.* FROM t2 NATURAL JOIN t1;
      ----
      2	3	4
      3	4	5
      
      query III rowsort
      SELECT t1.* FROM t2 NATURAL JOIN t1;
      ----
      1	2	3
      2	3	4
      
      query IIIIII nosort
      SELECT t1.*, t2.* FROM t2 NATURAL JOIN t1 ORDER BY t1.a
      ----
      1	2	3	2	3	4
      2	3	4	3	4	5
      

      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:
                Resolved: