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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalLazyMaterializeFileScan.java:
##########
@@ -17,35 +17,48 @@
 
 package org.apache.doris.nereids.trees.plans.physical;
 
+import org.apache.doris.nereids.memo.GroupExpression;
+import org.apache.doris.nereids.properties.LogicalProperties;
+import org.apache.doris.nereids.properties.PhysicalProperties;
 import org.apache.doris.nereids.trees.expressions.Slot;
 import org.apache.doris.nereids.trees.expressions.SlotReference;
+import org.apache.doris.nereids.trees.plans.AbstractPlan;
+import org.apache.doris.nereids.trees.plans.Plan;
+import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
+import org.apache.doris.statistics.Statistics;
 
 import com.google.common.collect.ImmutableList;
 
 import java.util.List;
 import java.util.Optional;
 
-/**
-    wrapper for FileScan used for lazy materialization
- */
+/** File scan wrapper that replaces deferred columns with a row-id used by the 
materialize node. */
 public class PhysicalLazyMaterializeFileScan extends PhysicalFileScan {
-    private PhysicalFileScan scan;
-    private SlotReference rowId;
+    private final PhysicalFileScan scan;
+    private final SlotReference rowId;
     private final List<Slot> lazySlots;
-    private List<Slot> output;
 
-    /**
-     * PhysicalLazyMaterializeFileScan
-     */
     public PhysicalLazyMaterializeFileScan(PhysicalFileScan scan, 
SlotReference rowId, List<Slot> lazySlots) {
+        this(scan, rowId, lazySlots, scan.getGroupExpression(), null,
+                scan.getPhysicalProperties(), scan.getStats());
+    }
+
+    private PhysicalLazyMaterializeFileScan(PhysicalFileScan scan, 
SlotReference rowId, List<Slot> lazySlots,
+            Optional<GroupExpression> groupExpression, LogicalProperties 
logicalProperties,
+            PhysicalProperties physicalProperties, Statistics statistics) {
         super(scan.getRelationId(), scan.getTable(), scan.getQualifier(), 
scan.getDistributionSpec(),
-                Optional.empty(), null, null, scan.getStats(),
-                scan.selectedPartitions, scan.getTableSample(),
+                groupExpression, logicalProperties, physicalProperties, 
statistics,
+                scan.getSelectedPartitions(), scan.getTableSample(),
                 scan.getTableSnapshot(), scan.getOperativeSlots(),
                 scan.getScanParams());
         this.scan = scan;
         this.rowId = rowId;
-        this.lazySlots = lazySlots;
+        this.lazySlots = ImmutableList.copyOf(lazySlots);
+    }
+
+    @Override
+    public <R, C> R accept(PlanVisitor<R, C> visitor, C context) {
+        return visitor.visitPhysicalLazyMaterializeFileScan(this, context);
     }

Review Comment:
   fixed



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