belugabehr commented on a change in pull request #1629:
URL: https://github.com/apache/hive/pull/1629#discussion_r520710633



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/Driver.java
##########
@@ -687,13 +685,36 @@ public boolean getResults(List results) throws 
IOException {
         return false;
       }
 
-      if (ss == Utilities.StreamStatus.EOF) {
+      if (streamStatus == Utilities.StreamStatus.EOF) {
         driverContext.setResStream(context.getStream());
       }
     }
     return true;
   }
 
+  @SuppressWarnings("rawtypes")
+  private boolean getFetchingTableResults(List results) throws IOException {
+    // If result set serialization to thrift object is enabled, and if the 
destination table is indeed written using
+    // ThriftJDBCBinarySerDe, read one row from the output sequence file, 
since it is a blob of row batches.
+    if (driverContext.getFetchTask().getWork().isUsingThriftJDBCBinarySerDe()) 
{
+      maxRows = 1;
+    }
+    driverContext.getFetchTask().setMaxRows(maxRows);
+    return driverContext.getFetchTask().fetch(results);
+  }
+
+  private String getRow(ByteStream.Output bos, Utilities.StreamStatus 
streamStatus) {
+    String row;

Review comment:
       nit: Safer to make this `final` to ensure that there aren't multiple 
paths later if this code changes.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to