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

Order by on a repeated index from the output of a flatten on large no of records results in incorrect results

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=3e33880

      The below query results in 200006 records. Based on the data set we should only receive 200000 records.

      select s.uid from (select d.uid, flatten(d.map.rm) rms from `data.json` d) s order by s.rms.rptd[1].d;
      

      When I removed the order by part, drill correctly reported 200000 records.

      select s.uid from (select d.uid, flatten(d.map.rm) rms from `data.json` d) s;
      

      I attached the data set with 2 records. I copied over the data set 50000 times and ran the queries on top of it. Let me know if you have any other questions

      Attachments

        1. data.json
          4 kB
          Rahul Kumar Challapalli

        Issue Links

          Activity

            People

              jaltekruse Jason Altekruse
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: