vvysotskyi commented on a change in pull request #2048: DRILL-7429: Wrong
column order when selecting complex data using Hive storage plugin
URL: https://github.com/apache/drill/pull/2048#discussion_r403730299
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/ProjectRecordBatch.java
##########
@@ -120,17 +119,7 @@ protected IterOutcome doWork() {
// since this is first batch and we already got a NONE, need to
set up the schema
doAlloc(0);
setValueCount(0);
-
- // Only need to add the schema for the complex exprs because
others should already have
- // been setup during setupNewSchema
- for (FieldReference fieldReference : complexFieldReferencesList) {
- MaterializedField field =
MaterializedField.create(fieldReference.getAsNamePart().getName(),
- UntypedNullHolder.TYPE);
- container.add(new UntypedNullVector(field,
container.getAllocator()));
- }
- container.buildSchema(SelectionVectorMode.NONE);
- wasNone = true;
- return IterOutcome.OK_NEW_SCHEMA;
+ return IterOutcome.NONE;
Review comment:
We haven't built the schema. I think even for the case when incoming
operator returned `NONE` for the first batch, we should also build the schema,
in the opposite case, we may break some cases of `limit 0` queries.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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