hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gop...@apache.org
Subject hive git commit: HIVE-12363: Incorrect results with orc ppd across ORC versions (Gopal V, reviewed by Prasanth Jayachandran)
Date Wed, 11 Nov 2015 14:39:16 GMT
Repository: hive
Updated Branches:
  refs/heads/master 4f7f88204 -> 1d5da097a


HIVE-12363: Incorrect results with orc ppd across ORC versions (Gopal V, reviewed by Prasanth
Jayachandran)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/1d5da097
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/1d5da097
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/1d5da097

Branch: refs/heads/master
Commit: 1d5da097a6b0554894f13840542ca96917c9d9d2
Parents: 4f7f882
Author: Gopal V <gopalv@apache.org>
Authored: Wed Nov 11 06:37:04 2015 -0800
Committer: Gopal V <gopalv@apache.org>
Committed: Wed Nov 11 06:37:34 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/1d5da097/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
index 0696277..04b9eaf 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
@@ -53,6 +53,7 @@ import org.apache.hadoop.io.Text;
 public class RecordReaderImpl implements RecordReader {
   static final Logger LOG = LoggerFactory.getLogger(RecordReaderImpl.class);
   private static final boolean isLogDebugEnabled = LOG.isDebugEnabled();
+  private static final Object UNKNOWN_VALUE = new Object();
   private final Path path;
   private final long firstRow;
   private final List<StripeInformation> stripes =
@@ -310,7 +311,7 @@ public class RecordReaderImpl implements RecordReader {
         return Boolean.TRUE;
       }
     } else {
-      return null;
+      return UNKNOWN_VALUE; // null is not safe here
     }
   }
 
@@ -359,6 +360,8 @@ public class RecordReaderImpl implements RecordReader {
       } else {
         return TruthValue.NULL;
       }
+    } else if (min == UNKNOWN_VALUE) {
+      return TruthValue.YES_NO_NULL;
     }
 
     TruthValue result;


Mime
View raw message