You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2015/10/05 21:41:42 UTC
[23/23] hive git commit: HIVE-12034 : HIVE-4243 broke things for llap
branch (Sergey Shelukhin)
HIVE-12034 : HIVE-4243 broke things for llap branch (Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/edd3079f
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/edd3079f
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/edd3079f
Branch: refs/heads/llap
Commit: edd3079f771d4b70914d79221bc0df8141e1957a
Parents: b28aec9
Author: Sergey Shelukhin <se...@apache.org>
Authored: Mon Oct 5 12:43:23 2015 -0700
Committer: Sergey Shelukhin <se...@apache.org>
Committed: Mon Oct 5 12:43:23 2015 -0700
----------------------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/edd3079f/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java
index 7d9353a..68d3255 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java
@@ -107,6 +107,7 @@ public final class OrcFile {
ORIGINAL(0),
HIVE_8732(1), // corrupted stripe/file maximum column statistics
HIVE_4243(2), // use real column names from Hive tables
+// Don't use any magic numbers here except for the below:
FUTURE(Integer.MAX_VALUE); // a version from a future writer
private final int id;
@@ -125,7 +126,7 @@ public final class OrcFile {
int max = Integer.MIN_VALUE;
for (WriterVersion v : WriterVersion.values()) {
if (v.id < 0) throw new AssertionError();
- if (v.id > max) {
+ if (v.id > max && FUTURE.id != v.id) {
max = v.id;
}
}
@@ -136,6 +137,7 @@ public final class OrcFile {
}
public static WriterVersion from(int val) {
+ if (val == FUTURE.id) return FUTURE; // Special handling for the magic value.
return values[val];
}
}