LuciferYang commented on code in PR #56731: URL: https://github.com/apache/spark/pull/56731#discussion_r3467244633
########## common/kvstore/src/main/java/org/apache/spark/util/kvstore/ArrayWrappers.java: ########## Review Comment: Good point. I switched the length tie-break to `Integer.compare` in both `ComparableIntArray` and `ComparableLongArray`, so each method is consistent with its element comparison. (The length subtraction was actually overflow-safe since lengths are non-negative, but `Integer.compare` reads better alongside the rest.) I left `ComparableByteArray` and `ComparableObjectArray` as they are: `ComparableByteArray` compares elements by subtraction too and is overflow-safe for the byte range, and `ComparableObjectArray` is outside this PR's scope. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
