hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgumas...@apache.org
Subject hive git commit: HIVE-13965: Empty resultset run into Exception when using Thrift Binary Serde (Ziyang Zhao reviewed by Vaibhav Gumashta)
Date Wed, 13 Jul 2016 21:11:19 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2.1 fce449c46 -> e9479f0f2


HIVE-13965: Empty resultset run into Exception when using Thrift Binary Serde (Ziyang Zhao
reviewed by Vaibhav Gumashta)


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

Branch: refs/heads/branch-2.1
Commit: e9479f0f20a92dc2cbc56db2de8c78022276e30d
Parents: fce449c
Author: Vaibhav Gumashta <vgumashta@hortonworks.com>
Authored: Wed Jul 13 14:08:49 2016 -0700
Committer: Vaibhav Gumashta <vgumashta@hortonworks.com>
Committed: Wed Jul 13 14:11:14 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e9479f0f/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
index e154d13..f3b1f18 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
@@ -1027,8 +1027,10 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc>
implements
           serializer.getClass().getName().equalsIgnoreCase(ThriftJDBCBinarySerDe.class.getName()))
{
           try {
             recordValue = serializer.serialize(null, inputObjInspectors[0]);
-            rowOutWriters = fpaths.outWriters;
-            rowOutWriters[0].write(recordValue);
+            if ( null != fpaths ) {
+              rowOutWriters = fpaths.outWriters;
+              rowOutWriters[0].write(recordValue);
+            }
           } catch (SerDeException | IOException e) {
             throw new HiveException(e);
           }


Mime
View raw message