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



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/Driver.java
##########
@@ -638,46 +654,28 @@ public boolean getResults(List results) throws 
IOException {
     }
 
     if (isFetchingTable()) {
-      /**
-       * If resultset 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);
+      return getFetchingTableResults(results);
     }
 
     if (driverContext.getResStream() == null) {
       driverContext.setResStream(context.getStream());
-    }
-    if (driverContext.getResStream() == null) {
-      return false;
+      if (driverContext.getResStream() == null) {
+        return false;
+      }
     }

Review comment:
       This is a little hard to follow.  Perhaps something like:
   
   ```
       if (driverContext.getResStream() == null) {
          // If the driver does not have a stream and neither does the context, 
return
          Stream contextStream = context.getStream();
          if (contextStream == null) {
            return false;
          }
          driverContext.setResStream(contextStream);
         }
       }
   ```




----------------------------------------------------------------
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