Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/1107#discussion_r167146312 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/spill/RecordBatchSizer.java --- @@ -311,8 +311,8 @@ public static ColumnSize getColumn(ValueVector v, String prefix) { public RecordBatchSizer(RecordBatch batch) { this(batch, - (batch.getSchema().getSelectionVectorMode() == BatchSchema.SelectionVectorMode.TWO_BYTE) ? - batch.getSelectionVector2() : null); + (batch.getSchema() == null ? null : (batch.getSchema().getSelectionVectorMode() == BatchSchema.SelectionVectorMode.TWO_BYTE ? --- End diff -- Does it even make sense to call the sizer if there is no schema? If there is no schema, there should be no vectors, so nothing to size.
---