manuzhang commented on PR #37074:
URL: https://github.com/apache/spark/pull/37074#issuecomment-1177067204
`RewritePredicateSubquery` checks for duplicated attributes in the outputSet
of outerPlan and subPlan. In this case, after `ColumnPruning`, the outputSet of
outerPlan is `a#250, a#266, b#251, c#268` and that of subPlan is `1#273, a#266,
b#267, c#268#277`.
```
Project [a#250, b#251, c#268]
+- Filter NOT exists#272 [(a#250 = a#266) && (b#251 = b#267) && (c#268
= c#268#277)]
: +- Project [1 AS 1#273, _1#259 AS a#266, _2#260 AS b#267, _3#261 AS
c#268#277]
: +- LocalRelation [_1#259, _2#260, _3#261]
+- Join Inner, (a#250 = a#266)
:- Project [a#250, b#251]
: +- Project [_1#243 AS a#250, _2#244 AS b#251]
: +- LocalRelation [_1#243, _2#244, _3#245]
+- Project [a#266, c#268]
+- Project [_1#259 AS a#266, _3#261 AS c#268]
+- LocalRelation [_1#259, _2#260, _3#261]
```
Anyway, `removeProjectBeforeFilter` intends to remove `Project` added by
`ColumnPruning`, which is the not case here. I'm not sure whether there is a
easy way to differentiate generally.
--
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]