Skip to content

Commit 3cc23f3

Browse files
author
Davies Liu
committed
fix flakyness of sameResult
1 parent f6a7f5c commit 3cc23f3

File tree

1 file changed

+3
-3
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans

1 file changed

+3
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,15 @@ abstract class QueryPlan[PlanType <: QueryPlan[PlanType]] extends TreeNode[PlanT
276276
// to erase that for equality testing.
277277
val cleanedExprId =
278278
Alias(a.child, a.name)(ExprId(-1), a.qualifiers, isGenerated = a.isGenerated)
279-
BindReferences.bindReference(cleanedExprId.canonicalized, allAttributes, allowFailures = true)
279+
BindReferences.bindReference(cleanedExprId, allAttributes, allowFailures = true)
280280
case other =>
281-
BindReferences.bindReference(other.canonicalized, allAttributes, allowFailures = true)
281+
BindReferences.bindReference(other, allAttributes, allowFailures = true)
282282
}
283283

284284
/** Args that have cleaned such that differences in expression id should not affect equality */
285285
protected lazy val cleanArgs: Seq[Any] = {
286286
def cleanArg(arg: Any): Any = arg match {
287-
case e: Expression => cleanExpression(e)
287+
case e: Expression => cleanExpression(e).canonicalized
288288
case other => other
289289
}
290290

0 commit comments

Comments
 (0)