Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-29918

RecordBinaryComparator should check endianness when compared by long

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 3.0.0
    • 2.4.5, 3.0.0
    • SQL

    Description

      If the architecture supports unaligned or the offset is 8 bytes aligned, RecordBinaryComparator compare 8 bytes at a time by reading 8 bytes as a long. Otherwise, it will compare bytes by bytes. 

      However, on little-endian machine,  the result of compared by a long value and compared bytes by bytes maybe different. If the architectures in a yarn cluster is different(Some is unaligned-access capable while others not), then the sequence of two records after sorted is undetermined, which will result in the same problem as in https://issues.apache.org/jira/browse/SPARK-23207

       

      Attachments

        Issue Links

          Activity

            People

              EdisonWang EdisonWang
              EdisonWang EdisonWang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: