github-actions[bot] commented on code in PR #64535:
URL: https://github.com/apache/doris/pull/64535#discussion_r3425807233


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AccessPathExpressionCollector.java:
##########
@@ -563,6 +577,10 @@ public Void visitIsNull(IsNull isNull, CollectorContext 
context) {

Review Comment:
   For MV rewrite fragments this still records a real nested data path after 
suppressing only the meta suffix. Reduced plan:
   
   ```text
   Filter(element_at(s, 'city') IS NOT NULL)
     OlapScan(s: STRUCT<city STRING, data ...>)
   ```
   
   `NestedColumnPruning` sets `skipMetaPath` for 
`isMaterializedViewRewritePlanFragment()`. With this branch, `visitIsNull` 
stops emitting `[s, city, NULL]`, but then calls `arg.accept(...)` with an 
empty builder, so `visitElementAt`/`visitSlotReference` records `[s, city]`. 
`pruneDataType` treats that as ordinary data access and `SlotTypeReplacer` 
narrows the scan slot to `struct<city:text>`. The previous guard deliberately 
dropped access info for the whole slot whenever an MV fragment contained a 
meta-only path, because the fragment is temporary and later MV rewrite 
consumers may still need the full complex slot or another child. The same 
pattern applies to the `skipMetaPath` branches above for `length`, `map_size`, 
and `cardinality` (for example `length(element_at(c_struct, 'f3'))` now records 
`[c_struct, f3]`).
   
   Please keep the old fragment invariant here: when skipping meta paths for an 
MV rewrite fragment, do not collect the child as a narrower data path, or 
restore the downstream behavior that drops access info for the whole slot once 
a meta-only path was present.



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