@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);
  }
Set the maximum number of rows returned by getResults.
ql/src/java/org/apache/hadoop/hive/ql/Driver.java