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

Sort incorrectly limits batch size to 65535 records rather than 65536

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.12.0
    • Fix Version/s: 1.13.0
    • Component/s: None
    • Labels:

      Description

      Drill places an upper limit on the number of rows in a batch of 64K. That is 65,536 decimal. When we index records, the indexes run from 0 to 64K-1 or 0 to 65,535.

      The sort code incorrectly uses Character.MAX_VALUE as the maximum row count. So, if an incoming batch uses the full 64K size, sort ends up splitting batches unnecessarily.

      The fix is to instead use the correct constant `ValueVector.MAX_ROW_COUNT`.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Paul.Rogers Paul Rogers
                Reporter:
                Paul.Rogers Paul Rogers
                Reviewer:
                Vlad Rozov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: