You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2022/08/13 01:29:25 UTC

[spark] branch master updated: [SPARK-40049][SQL][TESTS] Add ReplaceNullWithFalseInPredicateWithAQEEndToEndSuite

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

dongjoon 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 1a1e4938f97 [SPARK-40049][SQL][TESTS] Add ReplaceNullWithFalseInPredicateWithAQEEndToEndSuite
1a1e4938f97 is described below

commit 1a1e4938f97ecedbb99a440df27d365439a9a621
Author: Kazuyuki Tanimura <kt...@apple.com>
AuthorDate: Fri Aug 12 18:29:14 2022 -0700

    [SPARK-40049][SQL][TESTS] Add ReplaceNullWithFalseInPredicateWithAQEEndToEndSuite
    
    ### What changes were proposed in this pull request?
    This PR proposes to add `ReplaceNullWithFalseInPredicateWithAQEEndToEndSuite ` i.e. test cases of `ReplaceNullWithFalseInPredicateEndToEndSuite` with AQE (Adaptive Query Execution) turned on.
    
    ### Why are the changes needed?
    Currently `ReplaceNullWithFalseInPredicateEndToEndSuite` assumes that AQE is always turned off. We should also test with AQE turned on
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    Added an AQE version tests along with the non AQE version
    
    Closes #37500 from kazuyukitanimura/SPARK-40049.
    
    Authored-by: Kazuyuki Tanimura <kt...@apple.com>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 .../spark/sql/ReplaceNullWithFalseInPredicateEndToEndSuite.scala | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sql/core/src/test/scala/org/apache/spark/sql/ReplaceNullWithFalseInPredicateEndToEndSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/ReplaceNullWithFalseInPredicateEndToEndSuite.scala
index 8883e9be193..1b2b1e08632 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/ReplaceNullWithFalseInPredicateEndToEndSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/ReplaceNullWithFalseInPredicateEndToEndSuite.scala
@@ -19,16 +19,18 @@ package org.apache.spark.sql
 
 import org.apache.spark.sql.catalyst.expressions.{CaseWhen, If, Literal}
 import org.apache.spark.sql.execution.LocalTableScanExec
+import org.apache.spark.sql.execution.adaptive.{AdaptiveSparkPlanHelper, DisableAdaptiveExecutionSuite, EnableAdaptiveExecutionSuite}
 import org.apache.spark.sql.functions.{lit, when}
 import org.apache.spark.sql.internal.SQLConf
 import org.apache.spark.sql.test.SharedSparkSession
 import org.apache.spark.sql.types.BooleanType
 
-class ReplaceNullWithFalseInPredicateEndToEndSuite extends QueryTest with SharedSparkSession {
+class ReplaceNullWithFalseInPredicateEndToEndSuite extends QueryTest with SharedSparkSession with
+  AdaptiveSparkPlanHelper with DisableAdaptiveExecutionSuite {
   import testImplicits._
 
   private def checkPlanIsEmptyLocalScan(df: DataFrame): Unit =
-    df.queryExecution.executedPlan match {
+    stripAQEPlan(df.queryExecution.executedPlan) match {
       case s: LocalTableScanExec => assert(s.rows.isEmpty)
       case p => fail(s"$p is not LocalTableScanExec")
     }
@@ -124,3 +126,6 @@ class ReplaceNullWithFalseInPredicateEndToEndSuite extends QueryTest with Shared
     }
   }
 }
+
+class ReplaceNullWithFalseInPredicateWithAQEEndToEndSuite extends
+  ReplaceNullWithFalseInPredicateEndToEndSuite with EnableAdaptiveExecutionSuite


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