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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.14.0
    • None

    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

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

              Dates

                Created:
                Updated:
                Resolved: