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

UnsafeRow.hashCode assertion when sizeInBytes not multiple of 8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • SQL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: