You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jonathan-albrecht-ibm (via GitHub)" <gi...@apache.org> on 2025/02/10 15:59:38 UTC

[PR] [SPARK-51093][SQL][TESTS] Branch 3.5 Fix minor endianness issues in tests. [spark]

jonathan-albrecht-ibm opened a new pull request, #49866:
URL: https://github.com/apache/spark/pull/49866

   This is the branch-3.5 backport of https://github.com/apache/spark/pull/49812
   
   ### What changes were proposed in this pull request?
   Fix minor endianness issues in the following tests.
   
   ArrayBasedMapBuilderSuite: The output of the UnsafeRow.toString() is based on the underlying bytes and is endian dependent. Add an expected value for big endian platforms. Add an expected value for big endian platforms.
   
   WriteDistributionAndOrderingSuite: Casting the id of type Int to Long doesn't work on big endian platforms because the BucketFunction calls UnsafeRow.getLong() for that column. That happens to work on little endian since an int field is stored in the first 4 bytes of the 8 byte field so positive ints are layed out the same as positive longs ie. little endian order. On big endian, the layout of UnsafeRow int fields does not happen to match the layout of long fields for the same number. Change the type of the id column to Long so that it matches what BucketFunction expects. Change the type of the id column to Long so that it matches what BucketFunction expects.
   
   ### Why are the changes needed?
   Allow tests to pass on big endian platforms
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   Ran existing tests on amd64 (little endian) and s390x (big endian)
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-51093][SQL][TESTS][3.5] Fix minor endianness issues in tests [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #49866:
URL: https://github.com/apache/spark/pull/49866#issuecomment-2649052035

   Merged to branch-3.5 for Apache Spark 3.5.5. Thank you again, @jonathan-albrecht-ibm .


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-51093][SQL][TESTS][3.5] Fix minor endianness issues in tests [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #49866: [SPARK-51093][SQL][TESTS][3.5] Fix minor endianness issues in tests
URL: https://github.com/apache/spark/pull/49866


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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