HeartSaVioR commented on code in PR #37187:
URL: https://github.com/apache/spark/pull/37187#discussion_r920919627


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala:
##########
@@ -116,10 +116,20 @@ case class LogicalRDD(
       case e: Attribute => rewrite.getOrElse(e, e)
     }.asInstanceOf[SortOrder])
 
+    val rewrittenOriginLogicalPlan = originLogicalPlan.map { plan =>
+      assert(output == plan.output, "The output columns are expected to the 
same for output " +

Review Comment:
   Actually I added this assertion on initialization as precondition, and 
realized canonicalization breaks the precondition. (output is canonicalized, 
but originLogicalPlan is not a target of canonicalization)
   
   I wouldn't expect Spark calls newInstance against canonicalized node, but 
please correct me if I'm mistaken.



-- 
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]

Reply via email to