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


##########
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 have removed the "read_json_by_line","true" configuration. But I'm 
confused,I have been using this configuration to solve the [The size of this 
batch exceed the max size] problem for a long time and find nothing wrong。Maybe 
I need to study the code of be. 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: [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