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

Apache Spark commented on SPARK-36047:
--------------------------------------

User 'LuciferYang' has created a pull request for this issue:
https://github.com/apache/spark/pull/33260

> 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
>            Priority: Trivial
>
> 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

Reply via email to