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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalLazyMaterializeFileScan.java:
##########
@@ -55,16 +68,25 @@ public List<String> getQualifier() {
 
     @Override
     public List<Slot> computeOutput() {

Review Comment:
   Same caching-removal pattern as PhysicalLazyMaterializeTVFScan. The old code 
cached computeOutput() with an output field guard. The new code recomputes on 
every call. Consider restoring the cached output for consistency and to avoid 
repeated list allocations during plan traversal.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/visitor/PlanVisitor.java:
##########
@@ -301,15 +301,15 @@ public R 
visitPhysicalLazyMaterialize(PhysicalLazyMaterialize<? extends Plan> ma
     }
 
     public R 
visitPhysicalLazyMaterializeFileScan(PhysicalLazyMaterializeFileScan scan, C 
context) {
-        return visit(scan, context);
+        return visitPhysicalFileScan(scan, context);
     }
 
     public R 
visitPhysicalLazyMaterializeTVFScan(PhysicalLazyMaterializeTVFScan scan, C 
context) {
-        return visit(scan, context);
+        return visitPhysicalTVFRelation(scan, context);
     }
 
     public R 
visitPhysicalLazyMaterializeOlapScan(PhysicalLazyMaterializeOlapScan scan, C 
context) {

Review Comment:
   This delegation fix (visitPhysicalLazyMaterializeOlapScan -> 
visitPhysicalOlapScan, and same for FileScan/TVFScan) is a good cleanup. It 
eliminates the need for every visitor to add boilerplate overrides for the 
lazy-scan wrapper nodes. This is what enables the removal of the 
visitPhysicalLazyMaterializeOlapScan override from RuntimeFilterGenerator and 
simplifies TopnFilterPushDownVisitor.



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