You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/11/28 19:15:43 UTC

[GitHub] [druid] rohangarg commented on a diff in pull request #13406: fix KafkaInputFormat with nested columns

rohangarg commented on code in PR #13406:
URL: https://github.com/apache/druid/pull/13406#discussion_r1033954203


##########
extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaInputReader.java:
##########
@@ -113,14 +169,9 @@ private CloseableIterator<InputRow> buildBlendedRows(InputEntityReader valuePars
                 "Unsupported input format in valueFormat. KafkaInputFormat only supports input format that return MapBasedInputRow rows"
             );
           }
-          Map<String, Object> event = new HashMap<>(headerKeyList);
-          /* Currently we prefer payload attributes if there is a collision in names.
-              We can change this beahvior in later changes with a config knob. This default
-              behavior lets easy porting of existing inputFormats to the new one without any changes.
-            */
-          event.putAll(valueRow.getEvent());
-
-          HashSet<String> newDimensions = new HashSet<String>(valueRow.getDimensions());
+
+          final Map<String, Object> event = buildBlendedEventMap(valueRow.getEvent(), headerKeyList);

Review Comment:
   I see that the `ObjectFlattener` map has a property in field-discovery mode where the entry-set/key-set doesn't return nested object keys but doing a `get` returns the nested k-v pair. Is that left as is intentionally? 
   Should we maybe let the nested objects get listed as well through the `ObjectFlattener` map so that they can get consumed by nested columns whenever possible?



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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