Gabriel39 commented on code in PR #66346:
URL: https://github.com/apache/doris/pull/66346#discussion_r3695833465


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java:
##########
@@ -472,15 +473,17 @@ public List<Split> getSplits(int numBackends) throws 
UserException {
             }
             Optional<List<RawFile>> optRawFiles = 
dataSplit.convertToRawFiles();
             Optional<List<DeletionFile>> optDeletionFiles = 
dataSplit.deletionFiles();
-            if (applyCountPushdown && dataSplit.mergedRowCountAvailable()) {
-                splitStat.setMergedRowCount(dataSplit.mergedRowCount());
+            OptionalLong mergedRowCount = dataSplit.mergedRowCount();

Review Comment:
   `mergedRowCount()` is now evaluated for every `DataSplit`, even when 
`applyCountPushdown` is false. In Paimon 1.4.2 this method can call 
`dataEvolutionMergedRowCount()`, which builds and sorts file ranges, so 
ordinary Paimon scans gain avoidable planning work; previously the 
`applyCountPushdown && ...` short-circuit skipped it entirely. Please keep this 
call behind the pushdown guard (for example, use `applyCountPushdown ? 
dataSplit.mergedRowCount() : OptionalLong.empty()`) and add a regression test 
verifying that a non-count scan does not invoke `mergedRowCount()`.



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