github-actions[bot] commented on code in PR #67518:
URL: https://github.com/apache/doris/pull/67518#discussion_r4035359722
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalLazyMaterialize.java:
##########
@@ -126,8 +134,24 @@ public PhysicalLazyMaterialize(CHILD_TYPE child,
BiMap<Relation, SlotReference> relationToRowId,
Map<Slot, MaterializeSource> materializeMap,
PhysicalProperties physicalProperties, Statistics statistics) {
+ this(child, materializeInput, materializedSlots,
relationToLazySlotMap, relationToRowId,
+ materializeMap, ImmutableList.of(), physicalProperties,
statistics);
Review Comment:
[P1] Preserve the phase-2 backend snapshot when this node is copied. For
example:
```text
PhysicalLazyMaterialize(fetchBackends=[remote BE 7])
TopN
Project(P1)
Project(P2)
RemoteLazyScan
```
`LazyMaterializeTopN` runs before `MergeProjectPostProcessor`. When that
processor merges `P1/P2`, `DefaultPlanRewriter` rebuilds the ancestors through
`PhysicalLazyMaterialize.withChildren`; both that method and
`withPhysicalPropertiesAndStats` call this overload, so this
`ImmutableList.of()` replaces the populated `fetchBackends`. The translator
then emits an empty `nodes_info`, and BE fails the first retained row ID with
`failed to find rpc_struct` (for local tables as well as remote ones). Please
pass the existing `fetchBackends` through both copy methods and add a
copy/post-processor preservation test.
--
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]