You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean R. Owen (Jira)" <ji...@apache.org> on 2021/07/10 12:55:00 UTC
[jira] [Resolved] (SPARK-36047) Replace the handwriting compare
methods with static compare methods in Java code
[ https://issues.apache.org/jira/browse/SPARK-36047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean R. Owen resolved SPARK-36047.
----------------------------------
Fix Version/s: 3.3.0
Resolution: Fixed
Issue resolved by pull request 33260
[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
> Assignee: Yang Jie
> Priority: Trivial
> Fix For: 3.3.0
>
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org