Github user gczsjdy commented on the issue: https://github.com/apache/spark/pull/19755 I can't find a way to distinguish `reused` and `unreused` subquery. For example, in the `ReuseSubquery` rule, after seeing the 1st SubqueryExec(with `unreused` in name), it's buffered. When the rule sees the 2nd `SubqueryExec`, it will let the 2nd `PlanExpression` holds the same SubqueryExec buffered. This is the process of reuse, but it makes us not able to change the physical plan's name to indicate it's reused. I thought about add a var state in `SubqueryExec`, but it seems few physical plans do that.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org