You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/16 12:21:13 UTC

[GitHub] [spark] mundaym edited a comment on pull request #29762: [SPARK-32892][CORE][SQL] Fix hash functions on big-endian platforms.

mundaym edited a comment on pull request #29762:
URL: https://github.com/apache/spark/pull/29762#issuecomment-693368436


   Thanks, it sounds like the inline code that this PR uses is preferred to Platform class changes at this point so I'll leave this PR as-is.
   
   It might be worth reassessing this later if/when `jdk.internal.misc.Unsafe` is adopted since that introduces `getIntUnaligned` and `getLongUnaligned` which take into account endianness and alignment requirements on the target platform. Using those functions would make this code fully portable and - as part of the standard library - should be well optimized by the compiler. Certainly the unaligned load and the reverse bytes functions are both treated as intrinsics by Hotspot. I think we'd need to wait until JDK 8 support is dropped to adopt it though.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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