HappenLee commented on code in PR #66968:
URL: https://github.com/apache/doris/pull/66968#discussion_r3843529811
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AccessPathExpressionCollector.java:
##########
@@ -399,6 +400,26 @@ public Void visitMapValues(MapValues mapValues,
CollectorContext context) {
return continueCollectAccessPath(mapValues.getArgument(0), context);
}
+ @Override
+ public Void visitMapEntries(MapEntries mapEntries, CollectorContext
context) {
+ LinkedList<String> path = context.accessPathBuilder.accessPath;
+ if (path.size() >= 2 && AccessPathInfo.ACCESS_ALL.equals(path.get(0)))
{
Review Comment:
Thanks. I agree that the underlying access-path bug predates this feature,
but this PR introduces a new public path that can trigger it. Since #67047 is
still open and is not part of this PR base, #66968 is not correct as a
standalone change: a native stored MAP value captured only by a nested lambda
can still be pruned and produce wrong results.
Please either merge #67047 first and rebase this PR onto it, or include the
equivalent fix here. I would also keep a stored-table regression through
`transform_values` (outer key used directly, outer value used only inside the
nested lambda) so this feature cannot regress independently. I consider this
blocking until that dependency is 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]