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 2021/05/25 11:01:19 UTC

[GitHub] [druid] abhishekagarwal87 commented on a change in pull request #11293: handle timestamps correctly when parsing protobuf messages

abhishekagarwal87 commented on a change in pull request #11293:
URL: https://github.com/apache/druid/pull/11293#discussion_r638683056



##########
File path: extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/ProtobufInputRowParser.java
##########
@@ -89,11 +89,13 @@ public ProtobufInputRowParser withParseSpec(ParseSpec parseSpec)
       parser = parseSpec.makeParser();
     }
     Map<String, Object> record;
+    DateTime timestamp;
 
     if (parseSpec instanceof JSONParseSpec && ((JSONParseSpec) parseSpec).getFlattenSpec().getFields().isEmpty()) {
       try {
         DynamicMessage message = protobufBytesDecoder.parse(input);
         record = CollectionUtils.mapKeys(message.getAllFields(), k -> k.getJsonName());
+        timestamp = extractTimestampAsJson(record);

Review comment:
       Sure. do you have any suggestion on how to handle checkstyling for protobuf generated file? 




-- 
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@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org