englefly commented on code in PR #64440:
URL: https://github.com/apache/doris/pull/64440#discussion_r3422186099
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AccessPathExpressionCollector.java:
##########
@@ -380,20 +380,50 @@ private static boolean
isFunctionNullCheckPath(List<String> suffixPath) {
@Override
public Void visitMapContainsKey(MapContainsKey mapContainsKey,
CollectorContext context) {
+ // MAP_CONTAINS_KEY(<map>, <key>)
+ // Map argument: only the key sub-column is needed.
context.accessPathBuilder.addPrefix(AccessPathInfo.ACCESS_MAP_KEYS);
- return continueCollectAccessPath(mapContainsKey.getArgument(0),
context);
+ continueCollectAccessPath(mapContainsKey.getArgument(0), context);
+ // Key argument: visit with a fresh context to register its data
access paths.
+ // The key may reference nested sub-columns (e.g. element_at(s, 'a'))
whose
+ // full-data paths must be collected; otherwise an IS NULL / OFFSET
path on
+ // the same slot would cause NestedColumnPruning to prune to
metadata-only.
+ Expression keyArg = mapContainsKey.getArgument(1);
+ if (keyArg != null) {
Review Comment:
done
--
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]