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/03/09 07:22:12 UTC

[GitHub] [druid] clintropolis commented on a change in pull request #10962: Fix streaming ingestion fails if it encounters empty rows (Regression)

clintropolis commented on a change in pull request #10962:
URL: https://github.com/apache/druid/pull/10962#discussion_r590012195



##########
File path: core/src/main/java/org/apache/druid/data/input/impl/JsonReader.java
##########
@@ -90,11 +91,12 @@
   @Override
   protected List<InputRow> parseInputRows(String intermediateRow) throws IOException, ParseException
   {
+    List<InputRow> inputRows;

Review comment:
       nit: final

##########
File path: core/src/main/java/org/apache/druid/data/input/impl/JsonReader.java
##########
@@ -90,11 +91,12 @@
   @Override
   protected List<InputRow> parseInputRows(String intermediateRow) throws IOException, ParseException
   {
+    List<InputRow> inputRows;
     try (JsonParser parser = new JsonFactory().createParser(intermediateRow)) {
       final MappingIterator<JsonNode> delegate = mapper.readValues(parser, JsonNode.class);
-      return FluentIterable.from(() -> delegate)
-                           .transform(jsonNode -> MapInputRowParser.parse(inputRowSchema, flattener.flatten(jsonNode)))
-                           .toList();
+      inputRows = FluentIterable.from(() -> delegate)
+                                               .transform(jsonNode -> MapInputRowParser.parse(inputRowSchema, flattener.flatten(jsonNode)))
+                                               .toList();

Review comment:
       nit: this formatting seems off (intellij moves it in line with the `.from` when i pull your branch locally)




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