sigmod edited a comment on pull request #32298: URL: https://github.com/apache/spark/pull/32298#issuecomment-1075985290
> It never replaces a Project. I think it is more similar to `WithCTE` in that regard. Sorry, I misunderstood it. Yes, it's very similar to WithCTE. My thoughts are: - since we've already had `WithCTE` and `CTERef`, we probably don't want to re-invent a similar wheel for a narrower case (i.e., shared evaluation of subqueries). I suspect the additional performance gain is marginal, compared to the gain of shared scan and aggregate computation. - after this PR, subquery related rules also may have to think about `SubqueryReference` and `CommonSubqueries`; - what would happen if a `WithCTE` co-exists with `CommonSubqueries`; - `ColumnPruning` may also need to consider `SubqueryReference` and `CommonSubqueries`. -- 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]
