Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5937

Union All followed by except returns wrong results

    Details

    • Sprint:
      DV Sprint 62
    • Story Points:
      0.5
    • Steps to Reproduce:
      Hide

      Configure in the test-vdb.xml the following virtual views:

          <model visible = "true" type = "VIRTUAL" name = "views">
              <metadata type = "DDL"><![CDATA[
              create view test1 as select 1;
              create view test2 as select 2
              ]]>
              </metadata>
          </model>
      
      Show
      Configure in the test-vdb.xml the following virtual views: <model visible = "true" type = "VIRTUAL" name = "views" > <metadata type = "DDL" > <![CDATA[ create view test1 as select 1; create view test2 as select 2 ]]> </metadata> </model>

      Description

      The following queries return wrong results:

      -- <null> though should return 1 
      select * from views.test2 except select * from views.test1
      UNION ALL
      select * from views.test1 except select * from views.test2 ;;
       
      -- <null> though should return 1
      (select * from views.test2 except select * from views.test1
      UNION ALL
      select * from views.test1) except select * from views.test2 ;;
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                dalex005 Dmitrii Pogorelov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours, 30 minutes
                  5h 30m