cloud-fan edited a comment on pull request #28407: URL: https://github.com/apache/spark/pull/28407#issuecomment-621642692
> Just a side note that due to its eager way of substitution it can also cause performance degradation with queries where a CTE is defined but never actually used. Yea I thought about it as well. It's still doable if I change the map type to `Map[String, PlanHolder]` where `PlanHolder` can lazily calculate the plan. However, I feel it's too rare to have CTE relations defined but not used, and may not worth it. And CTE relation itself should not be very complex, so even if we do a substitution necessarily, mostly it doesn't matter. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org