abhishekagarwal87 commented on code in PR #13672:
URL: https://github.com/apache/druid/pull/13672#discussion_r1071750165
##########
extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/AvroFlattenerMaker.java:
##########
@@ -92,14 +92,22 @@ private static boolean isFieldPrimitive(Schema.Field field)
private final boolean fromPigAvroStorage;
private final boolean binaryAsString;
+ private final boolean discoverNestedFields;
+
/**
* @param fromPigAvroStorage boolean to specify the data file is stored
using AvroStorage
* @param binaryAsString boolean to encode the byte[] as a string.
Review Comment:
javadocs need an update.
##########
core/src/main/java/org/apache/druid/java/util/common/parsers/JSONFlattenerMaker.java:
##########
@@ -57,15 +57,21 @@ public class JSONFlattenerMaker implements
ObjectFlatteners.FlattenerMaker<JsonN
private final CharsetEncoder enc = StandardCharsets.UTF_8.newEncoder();
private final boolean keepNullValues;
+ private final boolean discoverNestedFields;
- public JSONFlattenerMaker(boolean keepNullValues)
+
+ public JSONFlattenerMaker(boolean keepNullValues, boolean
discoverNestedFields)
{
this.keepNullValues = keepNullValues;
+ this.discoverNestedFields = discoverNestedFields;
}
@Override
public Iterable<String> discoverRootFields(final JsonNode obj)
{
+ if (discoverNestedFields) {
Review Comment:
can you drop a one line comment here? I am assuming its like this since each
top-level field is a field of its own if we are allowing nested columns.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]