diff options
author | Aditya Kishore <adi@apache.org> | 2015-01-01 02:57:49 -0800 |
---|---|---|
committer | Aditya Kishore <adi@apache.org> | 2015-01-20 23:02:03 -0800 |
commit | 8d1e1affe86a5adca3bc17eeaf7520f0d379a393 (patch) | |
tree | 2fdca8f64ad72a34f36f470079103fb5bd795b4f /exec | |
parent | 50c0949ee76753de5360fe158e9b923e45be4d83 (diff) |
DRILL-1932: Query fails if the first record batch does not contain any record
+ Added test case which runs a query against an HBase table with first and last region empty.
Diffstat (limited to 'exec')
-rw-r--r-- | exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java | 5 |
1 files changed, 4 insertions, 1 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 29bf68e14..d68a5b55d 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 @@ -47,7 +47,6 @@ import org.apache.drill.exec.record.WritableBatch; import org.apache.drill.exec.record.selection.SelectionVector2; import org.apache.drill.exec.record.selection.SelectionVector4; import org.apache.drill.exec.store.RecordReader; -import org.apache.drill.exec.util.CallBack; import org.apache.drill.exec.vector.AllocationHelper; import org.apache.drill.exec.vector.NullableVarCharVector; import org.apache.drill.exec.vector.SchemaChangeCallBack; @@ -161,6 +160,10 @@ public class ScanBatch implements RecordBatch { currentReader.cleanup(); releaseAssets(); done = true; + if (mutator.isNewSchema()) { + container.buildSchema(SelectionVectorMode.NONE); + schema = container.getSchema(); + } return IterOutcome.NONE; } oContext.getStats().startSetup(); |