deniskuzZ commented on code in PR #6793:
URL: https://github.com/apache/hive/pull/6793#discussion_r4155125927


##########
llap-server/src/java/org/apache/hadoop/hive/llap/io/decode/EncodedDataConsumer.java:
##########
@@ -144,6 +143,19 @@ private void returnSourceData(BatchType data) {
   protected abstract void decodeBatch(BatchType batch,
       Consumer<ColumnVectorBatch> downstreamConsumer) throws 
InterruptedException;
 
+  /**
+   * Takes a batch from the pool and readies it for one decode pass. Pooled 
batches come back with
+   * whatever the last pass left on them - {@code resetBeforeOffer} 
deliberately resets nothing, so
+   * the column vectors can be reused - which makes clearing the filter 
context part of taking one:
+   * a selection left over from the previous batch would otherwise be read as 
this batch's own.
+   */
+  protected ColumnVectorBatch takeBatch(int batchSize) {

Review Comment:
   👍 



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

To unsubscribe, e-mail: [email protected]

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