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

UnsafeRow.hashCode assertion when sizeInBytes not multiple of 8

    Details

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

      Description

      The method is:

      public int hashCode() {
          return Murmur3_x86_32.hashUnsafeWords(baseObject, baseOffset, sizeInBytes, 42);
        }
      

      but sizeInBytes is not always a multiple of 8 (in which case hashUnsafeWords throws assertion) - for example here:

      FixedLengthRowBasedKeyValueBatch.appendRow

      The fix could be to use hashUnsafeBytes or to use hashUnsafeWords but on a prefix that is multiple of 8.

        Attachments

          Activity

            People

            • Assignee:
              kiszk Kazuaki Ishizaki
              Reporter:
              bograd Bogdan Raducanu
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: