wankunde commented on code in PR #40713:
URL: https://github.com/apache/spark/pull/40713#discussion_r1165627815


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala:
##########
@@ -676,19 +676,20 @@ case class WholeStageCodegenExec(child: SparkPlan)(val 
codegenStageId: Int)
           case _: WholeStageCodegenExec =>
           case _: InputRDDCodegen =>
           case c: CodegenSupport =>
-            val (newReusableExpressions, newAttributeSet) = 
c.reusableExpressions()
+            val (newReusableExpressions, newAttributeSeq) = 
c.reusableExpressions()
             // If the input attributes changed, collect current common 
expressions and clear
             // equivalentExpressions
-            if (!attributeSet.subsetOf(newAttributeSet)) {
+            if (attributeSeq.size != newAttributeSeq.size ||
+              attributeSeq.zip(newAttributeSeq).exists(tup => 
!tup._1.equals(tup._2))) {

Review Comment:
   Thanks for your advice.
   I want to check if the two attributes seq are the same. I'm not sure if this 
is a common code?



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