diff options
author | Mehant Baid <mehantr@gmail.com> | 2014-08-21 17:31:33 -0700 |
---|---|---|
committer | Jacques Nadeau <jacques@apache.org> | 2014-08-24 12:05:26 -0700 |
commit | c3e97fdfab67ff5d81d478e26534c3937fada07c (patch) | |
tree | 90df2e6c7561d6e708c7b949ef1345429d65a23e /exec/java-exec/src | |
parent | a6d74f5d1ea03314119a1b404a515251fd246a3f (diff) |
DRILL-1312: Use correct index to get partition vectors in ScanBatch
Diffstat (limited to 'exec/java-exec/src')
-rw-r--r-- | exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java index 947262753..e999c9a37 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java @@ -224,9 +224,10 @@ public class ScanBatch implements RecordBatch { } private void populatePartitionVectors() { - for (int i : selectedPartitionColumns) { + for (int index = 0; index < selectedPartitionColumns.size(); index++) { + int i = selectedPartitionColumns.get(index); + NullableVarCharVector v = (NullableVarCharVector) partitionVectors.get(index); if (partitionValues.length > i) { - NullableVarCharVector v = (NullableVarCharVector) partitionVectors.get(i); String val = partitionValues[i]; AllocationHelper.allocate(v, recordCount, val.length()); NullableVarCharHolder h = new NullableVarCharHolder(); @@ -241,7 +242,6 @@ public class ScanBatch implements RecordBatch { } v.getMutator().setValueCount(recordCount); } else { - NullableVarCharVector v = (NullableVarCharVector) partitionVectors.get(i); AllocationHelper.allocate(v, recordCount, 0); v.getMutator().setValueCount(recordCount); } |