This is an automated email from the ASF dual-hosted git repository.
wenchen pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new f677272 [SPARK-38754][SQL][TEST][3.1] Using EquivalentExpressions
getEquivalentExprs function instead of getExprState at
SubexpressionEliminationSuite
f677272 is described below
commit f677272d08de030ff9c4045ceec062168105b75c
Author: Dereck Li <[email protected]>
AuthorDate: Fri Apr 1 22:54:11 2022 +0800
[SPARK-38754][SQL][TEST][3.1] Using EquivalentExpressions
getEquivalentExprs function instead of getExprState at
SubexpressionEliminationSuite
### What changes were proposed in this pull request?
This pr use EquivalentExpressions getEquivalentExprs function instead of
getExprState at SubexpressionEliminationSuite, and remove cpus paramter.
### Why are the changes needed?
Fixes build error
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
CI Tests
Closes #36033 from monkeyboy123/SPARK-38754.
Authored-by: Dereck Li <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
---
.../sql/catalyst/expressions/SubexpressionEliminationSuite.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/SubexpressionEliminationSuite.scala
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/SubexpressionEliminationSuite.scala
index 6071b4b..0900765 100644
---
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/SubexpressionEliminationSuite.scala
+++
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/SubexpressionEliminationSuite.scala
@@ -330,13 +330,13 @@ class SubexpressionEliminationSuite extends SparkFunSuite
with ExpressionEvalHel
test("SPARK-38333: PlanExpression expression should skip addExprTree
function in Executor") {
try {
// suppose we are in executor
- val context1 = new TaskContextImpl(0, 0, 0, 0, 0, null, null, null, cpus
= 0)
+ val context1 = new TaskContextImpl(0, 0, 0, 0, 0, null, null, null)
TaskContext.setTaskContext(context1)
val equivalence = new EquivalentExpressions
val expression = DynamicPruningExpression(Exists(LocalRelation()))
equivalence.addExprTree(expression)
- assert(equivalence.getExprState(expression).isEmpty)
+ assert(equivalence.getEquivalentExprs(expression).size == 0)
} finally {
TaskContext.unset()
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]