This is an automated email from the ASF dual-hosted git repository. sorabh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/drill.git
commit d58554ff74c672312ae50e5ad26035f779c5a5d4 Author: Sorabh Hamirwasia <[email protected]> AuthorDate: Tue Aug 14 15:49:13 2018 -0700 DRILL-6687: Updated with review comments --- .../apache/drill/exec/physical/impl/svremover/AbstractSV2Copier.java | 2 +- .../org/apache/drill/exec/record/selection/SelectionVector2.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/svremover/AbstractSV2Copier.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/svremover/AbstractSV2Copier.java index ec712e5..68a0889 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/svremover/AbstractSV2Copier.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/svremover/AbstractSV2Copier.java @@ -56,7 +56,7 @@ public abstract class AbstractSV2Copier extends AbstractCopier { @Override public int copyRecords(int index, int recordCount) { - if (sv2.doFullTransfer()) { + if (sv2.canDoFullTransfer()) { for (TransferPair pair : transferPairs) { pair.transfer(); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/record/selection/SelectionVector2.java b/exec/java-exec/src/main/java/org/apache/drill/exec/record/selection/SelectionVector2.java index 1d9c5da..8afc5fb 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/record/selection/SelectionVector2.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/record/selection/SelectionVector2.java @@ -36,7 +36,10 @@ import org.apache.drill.exec.record.DeadBuf; public class SelectionVector2 implements AutoCloseable { private final BufferAllocator allocator; + // Indicates number of indexes stored in the SV2 buffer which may be less than actual number of rows stored in + // RecordBatch container owning this SV2 instance private int recordCount; + // Indicates actual number of rows in the RecordBatch container which owns this SV2 instance private int batchActualRecordCount = -1; private DrillBuf buffer = DeadBuf.DEAD_BUFFER; @@ -159,7 +162,7 @@ public class SelectionVector2 implements AutoCloseable { this.recordCount = recordCount; } - public boolean doFullTransfer() { + public boolean canDoFullTransfer() { return (recordCount == batchActualRecordCount); }
