HIV-10584 fix Integer references comparison in hcat OutputJobInfo (122)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/317df03b Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/317df03b Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/317df03b Branch: refs/heads/parquet Commit: 317df03beda8c986b3b9a90a16c327567189ef67 Parents: 500f298 Author: Alexander Pivovarov <apivova...@gmail.com> Authored: Sun May 3 01:31:18 2015 -0700 Committer: Alexander Pivovarov <apivova...@gmail.com> Committed: Tue May 12 16:24:21 2015 -0700 ---------------------------------------------------------------------- .../java/org/apache/hive/hcatalog/mapreduce/OutputJobInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/317df03b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/OutputJobInfo.java ---------------------------------------------------------------------- diff --git a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/OutputJobInfo.java b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/OutputJobInfo.java index d50f43b..ce0d6d1 100644 --- a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/OutputJobInfo.java +++ b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/OutputJobInfo.java @@ -119,7 +119,7 @@ public class OutputJobInfo implements Serializable { Collections.sort(posOfPartCols, new Comparator<Integer>() { @Override public int compare(Integer earlier, Integer later) { - return (earlier > later) ? -1 : ((earlier == later) ? 0 : 1); + return later.compareTo(earlier); } }); this.posOfPartCols = posOfPartCols;