zml1206 commented on PR #46499: URL: https://github.com/apache/spark/pull/46499#issuecomment-2129064493
> Can we make `With` nested as well? I have thought about it for a long time, and I can change the logic of withRewrite. The `alias` generated by the lowest layer with is in the uppermost project, which is currently reversed. This can solve the complex nesting above. `with(with(((commonexpressionref(CommonExpressionId(1,false), IntegerType, true) + commonexpressionref(CommonExpressionId(1,false), IntegerType, true)) > commonexpressionref(CommonExpressionId(0,false), IntegerType, true)), commonexpressiondef((commonexpressionref(CommonExpressionId(0,false), IntegerType, true) * commonexpressionref(CommonExpressionId(0,false), IntegerType, true)), CommonExpressionId(1,false))), commonexpressiondef((a#0 + a#0), CommonExpressionId(0,false)))` Do you think it’s feasible? If so, I’ll do it. -- 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: reviews-unsubscr...@spark.apache.org 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