This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new c1c3f4f  [SPARK-38679][SQL][TESTS][FOLLOW-UP] Add numPartitions 
parameter to TaskContextImpl at SubexpressionEliminationSuite
c1c3f4f is described below

commit c1c3f4f93dcc097624b24de993a48f4a57f7e70e
Author: Ted Yu <yuzhih...@gmail.com>
AuthorDate: Fri Apr 1 08:55:13 2022 +0900

    [SPARK-38679][SQL][TESTS][FOLLOW-UP] Add numPartitions parameter to 
TaskContextImpl at SubexpressionEliminationSuite
    
    ### What changes were proposed in this pull request?
    This PR adds missing `numPartitions` parameter for `TaskContextImpl` ctor.
    
    ### Why are the changes needed?
    This PR fixes build error:
    
    ```
    
spark/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/SubexpressionEliminationSuite.scala:426:
 not enough arguments for constructor TaskContextImpl: (stageId: Int, 
stageAttemptNumber: Int, partitionId: Int, taskAttemptId: Long, attemptNumber: 
Int, numPartitions: Int, taskMemoryManager: 
org.apache.spark.memory.TaskMemoryManager, localProperties: 
java.util.Properties, metricsSystem: org.apache.spark.metrics.MetricsSystem, 
taskMetrics: org.apache.spark.executor.Task [...]
    Unspecified value parameter metricsSystem.
    ```
    This was due to commit a40acd4392a8611062763ce6ec7bc853d401c646 not being 
updated with latest TaskContextImpl ctor before merging.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    ```
    ./build/mvn install -Phive -Phive-thriftserver -DskipTests
    ```
    
    Closes #36029 from tedyu/subex-ctx.
    
    Authored-by: Ted Yu <yuzhih...@gmail.com>
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
---
 .../spark/sql/catalyst/expressions/SubexpressionEliminationSuite.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 3c96ba4..4ad5c92 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
@@ -423,7 +423,7 @@ 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, 1, null, null, null, 
cpus = 0)
       TaskContext.setTaskContext(context1)
 
       val equivalence = new EquivalentExpressions

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to