hubgeter commented on code in PR #69704:
URL: https://github.com/apache/doris/pull/69704#discussion_r4398209105


##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorTransaction.java:
##########
@@ -732,6 +737,9 @@ public long getUpdateCnt() {
                 dataRows += affectedRows;
             }
         }
+        if (hasActionScopedDeleteRows) {
+            return dataRows + deleteOnlyRows;

Review Comment:
   Fixed in 8cfbe1fca73. For delete-only results (`dataRows == 0`), the 
transaction now returns the full `deleteRows` total so unmarked old-BE 
producers are preserved alongside marked new-BE producers. Added 
`getUpdateCntPreservesMixedVersionDeleteOnlyProducers` covering marked + 
unmarked fragments (2 + 3 = 5).



##########
regression-test/suites/external_table_p0/iceberg/dml/test_iceberg_merge_into_advanced.groovy:
##########
@@ -187,6 +187,20 @@ suite("test_iceberg_merge_into_advanced", 
"p0,external,iceberg,external_docker,e
         def q_check_m3 = "order_qt_${format}_check_m3"
         "${q_check_m3}" """SELECT * FROM ${formatTableName}"""
 
+        // Mixed standalone DELETE and INSERT actions must both contribute to 
the client row count.
+        def mergeCountResult = sql """
+            MERGE INTO ${formatTableName} t
+            USING (
+                SELECT 4 AS id, 'delete' AS action, 'unused' AS name
+                UNION ALL
+                SELECT 6 AS id, 'insert' AS action, 'Frank' AS name
+            ) s
+            ON t.id = s.id
+            WHEN MATCHED AND s.action = 'delete' THEN DELETE
+            WHEN NOT MATCHED THEN INSERT (id, name) VALUES (s.id, s.name)
+        """
+        assertEquals("2", mergeCountResult[0][0].toString())

Review Comment:
   Fixed in 8cfbe1fca73. The mixed INSERT/DELETE assertion now uses a dedicated 
temporary table and drops it immediately, so later schema/subquery cases retain 
their original state. Updated the advanced `multi_when` golden from 1 to 2 and 
the basic `q01`/`q04` goldens from 2 to 3 for both Parquet and ORC, matching 
the corrected affected-row behavior observed in TeamCity.



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