morrySnow commented on code in PR #41362:
URL: https://github.com/apache/doris/pull/41362#discussion_r1794613107


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PruneEmptyPartition.java:
##########
@@ -18,30 +18,59 @@
 package org.apache.doris.nereids.rules.rewrite;
 
 import org.apache.doris.catalog.OlapTable;
+import org.apache.doris.catalog.Partition;
 import org.apache.doris.nereids.rules.Rule;
 import org.apache.doris.nereids.rules.RuleType;
 import org.apache.doris.nereids.trees.plans.logical.LogicalEmptyRelation;
 import org.apache.doris.nereids.trees.plans.logical.LogicalOlapScan;
 import org.apache.doris.qe.ConnectContext;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
 import java.util.List;
 
 /**
  * Used to prune empty partition.
  */
 public class PruneEmptyPartition extends OneRewriteRuleFactory {
+    public static final Logger LOG = 
LogManager.getLogger(PruneEmptyPartition.class);
 
     @Override
     public Rule build() {
         return logicalOlapScan().thenApply(ctx -> {
             LogicalOlapScan scan = ctx.root;
             OlapTable table = scan.getTable();
             List<Long> ids = 
table.selectNonEmptyPartitionIds(scan.getSelectedPartitionIds());
+            addPartitionsForTxnLoad(scan.getSelectedPartitionIds(), ids, 
table, scan.getSelectedIndexId());

Review Comment:
   why add this, could u add some comment to explain? i think we should not do 
txn things here, maybe we could find another better way to do it



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