cloud-fan commented on a change in pull request #33142: URL: https://github.com/apache/spark/pull/33142#discussion_r660902531
########## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/SubexpressionEliminationSuite.scala ########## @@ -159,35 +156,34 @@ class SubexpressionEliminationSuite extends SparkFunSuite with ExpressionEvalHel equivalence1.addExprTree(ifExpr1) // `add` is in both two branches of `If` and predicate. - assert(equivalence1.getAllEquivalentExprs().count(_.size == 2) == 1) - assert(equivalence1.getAllEquivalentExprs().filter(_.size == 2).head == Seq(add, add)) + assert(equivalence1.getAllExprStates().count(_.useCount == 3) == 1) Review comment: 3 is the right answer: `add` appears in condition, true and false branches. -- 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