You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2020/04/09 08:52:17 UTC

[GitHub] [drill] ihuzenko commented on a change in pull request #2048: DRILL-7429: Wrong column order when selecting complex data using Hive storage plugin

ihuzenko 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_r406054349
 
 

 ##########
 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:
   AFAIK there is ```handleNullInput()``` which should be called for this purpose. Here was workaround for adding late complex types to container and rebuilding schema was necessary. One thing I may be missing here is setting ```wasNone = true;```, so I'll add it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services