Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9554

[Java] FixedWidthInPlaceVectorSorter sometimes produces wrong result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Java

    Description

      I noticed that FixedWidthInPlaceVectorSorter in the arrow-algorithms library produces the wrong result. A simple test case is a IntVector with the following values:

       

      [0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 34, 35, 60, 61, 62, 63, 64, 65, 6, 7, 8, 9, 10, 11, 36, 37, 38, 39, 40, 41, 66, 67, 68, 69, 70, 71]

       

      The expected result of sorting is

      [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71]

      What I actually observe is

      [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 30, 31, 32, 33, 34, 36, 35, 36, 60, 61, 62, 63, 64, 71, 71, 71, 71, 71, 65, 66, 67, 68, 69, 70, 71]

       

      I have not yet determined whether any of the other sorters are also buggy.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chairmank Steve M. Kim
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h