lxwcodemonkey commented on code in PR #91:
URL: 
https://github.com/apache/doris-spark-connector/pull/91#discussion_r1159241263


##########
spark-doris-connector/src/main/java/org/apache/doris/spark/DorisStreamLoad.java:
##########
@@ -162,8 +120,10 @@ private HttpPut getHttpPut(String label, String 
loadUrlStr) {
                     .filter(entry -> 
!"read_json_by_line".equals(entry.getKey()))
                     .forEach(entry -> httpPut.setHeader(entry.getKey(), 
entry.getValue()));
         }
-        if (fileType.equals("json")) {
+        if (dataFormat.getType().equalsIgnoreCase(FormatEnum.json.name())) {
             httpPut.setHeader("strip_outer_array", "true");
+            //to solve the error : The size of this batch exceed the max size 
[104857600]  of json type data. Split the file, or use 'read_json_by_line'
+            httpPut.setHeader("read_json_by_line","true");

Review Comment:
   I read 
https://doris.apache.org/zh-CN/docs/data-operate/import/import-way/load-json-format/
 this document, I already know the difference between the two, It may indeed 
cause some problems, although I haven't found any problems in my current tests, 
I will remove this read_json_by_line configuration in json format first, and 
consider optimizing it in the next PR,thank you!!!



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