sohami commented on a change in pull request #1334: DRILL-6385: Support JPPD
feature
URL: https://github.com/apache/drill/pull/1334#discussion_r207749931
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java
##########
@@ -190,11 +213,21 @@ public IterOutcome next() {
if (isNewSchema) {
// Even when recordCount = 0, we should return return OK_NEW_SCHEMA
if current reader presents a new schema.
// This could happen when data sources have a non-trivial schema
with 0 row.
- container.buildSchema(SelectionVectorMode.NONE);
+ if (firstRuntimeFiltered) {
+ container.buildSchema(SelectionVectorMode.TWO_BYTE);
+ runtimeFiltered = true;
+ } else {
+ container.buildSchema(SelectionVectorMode.NONE);
Review comment:
If there is a schema change post `runtimeFiltered` was set to true, then for
each batch output container will always be of type NONE, but
`applyRuntimeFilter` will still generate `SelectionVector2` for some batches
which will not be used downstream. I think `runtimeFiltered` flag should be
reset with `isNewSchema` flag and then `applyRuntimeFilter` should be called.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services