Yang Jie created SPARK-36047: -------------------------------- Summary: Replace the handwriting compare methods with static compare methods in Java code Key: SPARK-36047 URL: https://issues.apache.org/jira/browse/SPARK-36047 Project: Spark Issue Type: Improvement Components: Spark Core Affects Versions: 3.3.0 Reporter: Yang Jie
There are some handwriting compare methods like `ShuffleInMemorySorter.SortComparator` {code:java} private static final class SortComparator implements Comparator<PackedRecordPointer> { @Override public int compare(PackedRecordPointer left, PackedRecordPointer right) { int leftId = left.getPartitionId(); int rightId = right.getPartitionId(); return Integer.compare(leftId, rightId); } } {code} the handwriting compare methods can replace with `Integer.compare()` method and similar methods after Java 1.7 -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org