You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/05/20 00:06:45 UTC

[GitHub] [incubator-pinot] siddharthteotia commented on a change in pull request #6946: Add collectionToJsonMode to schema inference

siddharthteotia commented on a change in pull request #6946:
URL: https://github.com/apache/incubator-pinot/pull/6946#discussion_r635660091



##########
File path: pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroUtils.java
##########
@@ -134,18 +136,19 @@ public static Schema getPinotSchemaFromAvroDataFile(File avroDataFile)
    * @param complexType if allows complex-type handling
    * @param unnestFields the fields to unnest
    * @param delimiter the delimiter separating components in nested structure
+   * @param collectionToJsonMode to mode of converting collection to JSON string
    * @return Pinot schema
    */
   public static Schema getPinotSchemaFromAvroSchemaFile(File avroSchemaFile,
       @Nullable Map<String, FieldSpec.FieldType> fieldTypeMap, @Nullable TimeUnit timeUnit, boolean complexType,
-      List<String> unnestFields, String delimiter)
+      List<String> unnestFields, String delimiter, ComplexTypeConfig.CollectionToJsonMode collectionToJsonMode)

Review comment:
       (nit)
   - Can we pass all three unnestFields, delimiter and collectionToJsonMode as one config that encapsulates all the complex type config since I believe unnestFields and delimiter are also extracted from what user configured
   
   - Suggest renaming collectionToJson -> convertCollectionNotUnnestedToJson or something similar which is slightly more descriptive




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org