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

Queries with ORDER BY and OFFSET (w/o LIMIT) do not return any rows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.14.0
    • Component/s: None
    • Labels:

      Description

      This is easily reproduced with the following test

          final ClusterFixtureBuilder builder = new ClusterFixtureBuilder(baseDirTestWatcher);
      
          try (ClusterFixture clusterFixture = builder.build();
               ClientFixture clientFixture = clusterFixture.clientFixture()) {
            clientFixture.testBuilder()
              .sqlQuery("select name_s10 from `mock`.`employees_100000` order by name_s10 offset 100")
              .expectsNumRecords(99900)
              .build()
              .run();
          }
      

      That fails with

      java.lang.AssertionError:
      Expected :99900
      Actual :0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timothyfarkas Timothy Farkas
                Reporter:
                timothyfarkas Timothy Farkas
                Reviewer:
                Aman Sinha
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: