github-actions[bot] commented on code in PR #63736:
URL: https://github.com/apache/doris/pull/63736#discussion_r3360173865
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/materialize/MaterializeProbeVisitor.java:
##########
@@ -149,7 +158,7 @@ public Optional<MaterializeSource>
visitPhysicalOlapScan(PhysicalOlapScan scan,
if (KeysType.AGG_KEYS.equals(table.getKeysType())) {
return Optional.empty();
}
Review Comment:
Dropping the `scan.getOperativeSlots()` guard makes scan-level required
columns eligible for lazy materialization. `OperativeColumnDerive` still marks
slots needed by scan virtual columns and other scan-side work as operative, but
`collectProjectExprInputSlots()` only reconstructs project/key/non-original
requirements and does not add those operative slots. For a scan with a virtual
column whose base slot is also a TopN output, this probe can now return a
`MaterializeSource`; `LazySlotPruning` then removes that slot from
`PhysicalLazyMaterializeOlapScan.computeOutput()`, while the underlying scan
still needs it to compute the operative/virtual expression. Please keep the
existing operative-slot rejection in addition to the new
`requiredMaterializedSlots` check, and apply the same rule to the catalog/TVF
relation branches that also dropped `getOperativeSlots()`.
--
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]