You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kazuaki Ishizaki (JIRA)" <ji...@apache.org> on 2017/07/01 01:31:01 UTC

[jira] [Commented] (SPARK-21271) UnsafeRow.hashCode assertion when sizeInBytes not multiple of 8

    [ https://issues.apache.org/jira/browse/SPARK-21271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16070933#comment-16070933 ] 

Kazuaki Ishizaki commented on SPARK-21271:
------------------------------------------

In {{UnsafeRow}}, the length of fixed part should be a multiple of 8. However, the length of variable part may not require this regulation.
[~cloud_fan] What do you think?

> UnsafeRow.hashCode assertion when sizeInBytes not multiple of 8
> ---------------------------------------------------------------
>
>                 Key: SPARK-21271
>                 URL: https://issues.apache.org/jira/browse/SPARK-21271
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Bogdan Raducanu
>
> The method is:
> {code}
> public int hashCode() {
>     return Murmur3_x86_32.hashUnsafeWords(baseObject, baseOffset, sizeInBytes, 42);
>   }
> {code}
> but sizeInBytes is not always a multiple of 8 (in which case hashUnsafeWords throws assertion) - for example here: {code}FixedLengthRowBasedKeyValueBatch.appendRow{code}
> The fix could be to use hashUnsafeBytes or to use hashUnsafeWords but on a prefix that is multiple of 8.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org