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

Union All followed by except returns wrong results

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 15.0, 13.1.2, 14.0.1
    • 13.1
    • Query Engine
    • None
    • DV Sprint 62
    • 0.5
    • 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>

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

            rhn-engineering-shawkins Steven Hawkins
            dalex005 Dmitrii Pogorelov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                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