vvysotskyi commented on a change in pull request #1856: DRILL-7376: Drill 
ignores Hive schema for MaprDB tables when group scan has star column
URL: https://github.com/apache/drill/pull/1856#discussion_r324537379
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/fn/JsonReaderUtils.java
 ##########
 @@ -120,4 +95,100 @@ public static void 
ensureAtLeastOneField(BaseWriter.ComplexWriter writer,
       }
     }
   }
+
+  /**
+   * Creates writers which correspond to the specified schema for specified 
root writer.
+   *
+   * @param writer      parent writer for writers to create
+   * @param columns     collection of columns for which writers should be 
created
+   * @param schema      table schema
+   * @param allTextMode whether all primitive writes should be for varchar type
+   */
+  public static void writeColumnsFromSchema(BaseWriter.ComplexWriter writer,
+      Collection<SchemaPath> columns, TupleMetadata schema, boolean 
allTextMode) {
+    Preconditions.checkArgument(schema != null, "Schema was not provided");
 
 Review comment:
   Agree, thanks, removed redundant check.

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

Reply via email to