baishaoisde commented on code in PR #99:
URL: 
https://github.com/apache/doris-spark-connector/pull/99#discussion_r1209121186


##########
spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/DorisSourceProvider.scala:
##########
@@ -83,10 +84,11 @@ private[sql] class DorisSourceProvider extends 
DataSourceRegister
           line.add(field.asInstanceOf[AnyRef])
         }
         rowsBuffer.add(line)
-        if (rowsBuffer.size > maxRowCount) {
+        if (!partitionTaskAtomicity && rowsBuffer.size > maxRowCount) {
           flush
         }
       })
+      flush

Review Comment:
   This flush is to allow each partition to commit only one StreamLoad task 
when the partitionTaskAtomicity parameter is true, but seems redundant because 
the code already has the "if (! rowArray.isEmpty) {flush} "operation.



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