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/03/11 11:50:35 UTC

[GitHub] [drill] arina-ielchiieva commented on a change in pull request #1993: DRILL-7601: Shift column conversion to reader from scan framework

arina-ielchiieva commented on a change in pull request #1993: DRILL-7601: Shift column conversion to reader from scan framework
URL: https://github.com/apache/drill/pull/1993#discussion_r390917852
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/avro/AvroBatchReader.java
 ##########
 @@ -69,11 +69,15 @@ public boolean open(FileScanFramework.FileSchemaNegotiator negotiator) {
       negotiator.userName(), negotiator.context().getFragmentContext().getQueryUserName());
 
     logger.debug("Avro file schema: {}", reader.getSchema());
-    TupleMetadata schema = AvroSchemaUtil.convert(reader.getSchema());
-    logger.debug("Avro file converted schema: {}", schema);
-    negotiator.setTableSchema(schema, true);
+    TupleMetadata readerSchema = AvroSchemaUtil.convert(reader.getSchema());
+    logger.debug("Avro file converted schema: {}", readerSchema);
+    TupleMetadata providedSchema = negotiator.providedSchema();
+    TupleMetadata tableSchema = StandardConversions.mergeSchemas(providedSchema, readerSchema);
 
 Review comment:
   Sounds good, since it's not the final code change, we can leave it as is. Thanks for the explanation.

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