Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4825

Wrong data with UNION ALL when querying different sub-directories under the same table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.6.0, 1.7.0, 1.8.0
    • 1.8.0
    • None

    Description

      git.commit.id.abbrev=0700c6b

      The below query returns wrongs results

      select count (*) from (
        select l_orderkey, dir0 from l_3level t1 where t1.dir0 = 1 and t1.dir1='one' and t1.dir2 = '2015-7-12'
        union all 
        select l_orderkey, dir0 from l_3level t2 where t2.dir0 = 1 and t2.dir1='two' and t2.dir2 = '2015-8-12') data;
      +---------+
      | EXPR$0  |
      +---------+
      | 20      |
      +---------+
      

      The wrong result is evident from the output of the below queries

      0: jdbc:drill:zk=10.10.100.190:5181> select count (*) from (select l_orderkey, dir0 from l_3level t2 where t2.dir0 = 1 and t2.dir1='two' and t2.dir2 = '2015-8-12');
      +---------+
      | EXPR$0  |
      +---------+
      | 30      |
      +---------+
      1 row selected (0.258 seconds)
      0: jdbc:drill:zk=10.10.100.190:5181> select count (*) from (select l_orderkey, dir0 from l_3level t2 where t2.dir0 = 1 and t2.dir1='one' and t2.dir2 = '2015-7-12');
      +---------+
      | EXPR$0  |
      +---------+
      | 10      |
      +---------+
      

      I attached the data set. Let me know if you need anything more

      Attachments

        1. l_3level.tgz
          13 kB
          Rahul Kumar Challapalli

        Issue Links

          Activity

            People

              jni Jinfeng Ni
              rkins Rahul Kumar Challapalli
              Rahul Kumar Challapalli Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: