jon-wei commented on code in PR #13089:
URL: https://github.com/apache/druid/pull/13089#discussion_r978893807


##########
core/src/main/java/org/apache/druid/data/input/impl/JsonInputFormat.java:
##########
@@ -109,9 +144,13 @@ public boolean isSplittable()
   @Override
   public InputEntityReader createReader(InputRowSchema inputRowSchema, 
InputEntity source, File temporaryDirectory)
   {
-    return this.lineSplittable ?
-           new JsonLineReader(inputRowSchema, source, getFlattenSpec(), 
objectMapper, keepNullColumns) :
-           new JsonReader(inputRowSchema, source, getFlattenSpec(), 
objectMapper, keepNullColumns);
+    if (this.lineSplittable || this.assumeNewlineDelimited) {

Review Comment:
   `lineSplittable` is used as an indicator from the task implementation as to 
whether it expects the input to be newline delimited (and thus use either 
JsonLineReader or JsonReader). Prior to this patch, batch tasks would always 
use newline delimited (JsonLineReader) and streaming tasks would always use the 
multiline parser (JsonReader).
   
   With this patch, batch tasks would still always use newline delimited, while 
for streaming tasks the behavior is configurable (controlled by the new 
asssumeNewlineDelimited property)



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

Reply via email to