JNSimba commented on code in PR #120:
URL: 
https://github.com/apache/doris-spark-connector/pull/120#discussion_r1272923188


##########
spark-doris-connector/src/main/java/org/apache/doris/spark/load/DorisStreamLoad.java:
##########
@@ -105,6 +107,12 @@ public DorisStreamLoad(SparkSettings settings) {
         fileType = streamLoadProp.getOrDefault("format", "csv");
         if ("csv".equals(fileType)){
             FIELD_DELIMITER = 
EscapeHandler.escapeString(streamLoadProp.getOrDefault("column_separator", 
"\t"));
+        } else if ("json".equalsIgnoreCase(fileType)) {
+            readJsonByLine = 
Boolean.parseBoolean(streamLoadProp.getOrDefault("read_json_by_line", "false"));
+            boolean stripOuterArray = 
Boolean.parseBoolean(streamLoadProp.getOrDefault("strip_outer_array", "false"));
+            if (readJsonByLine == stripOuterArray) {
+                throw new IllegalArgumentException("Only one of options 
'read_json_by_line' and 'strip_outer_array' can be set to true");
+            }

Review Comment:
   Do need to give a default value?



-- 
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-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to