zml1206 commented on code in PR #49202:
URL: https://github.com/apache/spark/pull/49202#discussion_r1906555390
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteWithExpression.scala:
##########
@@ -90,7 +90,17 @@ object RewriteWithExpression extends Rule[LogicalPlan] {
// the current operator may have extra columns if it inherits the output
columns from its
// child, and we need to project away the extra columns to keep the plan
schema unchanged.
assert(p.output.length <= newPlan.output.length)
- if (p.output.length < newPlan.output.length) {
+ newPlan.output.diff(p.output).forall(_.name.startsWith("_"))
Review Comment:
The redundant ones will be deleted later.
--
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]