diff --git a/omnioperator/omniop-spark-extension/spark-extension-ut/spark32-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala b/omnioperator/omniop-spark-extension/spark-extension-ut/spark32-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala index 9b97295fc1a8dd7b92171ade804e5997094ec92d..c86375ae05a848d20535140b85cf9759bc025d21 100644 --- a/omnioperator/omniop-spark-extension/spark-extension-ut/spark32-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala +++ b/omnioperator/omniop-spark-extension/spark-extension-ut/spark32-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala @@ -143,22 +143,7 @@ class FallbackStrategiesSuite extends QueryTest with SharedSparkSession { } - test("Fall back the last stage contains unsupported bnlj if meeting the configured threshold") { - withSQLConf(("spark.omni.sql.columnar.wholeStage.fallback.threshold", "2"), - (SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")) { - val df = spark.sql("select age + salary from (select age, salary from (select age from employees_for_fallback_ut_test order by age limit 1) s1," + - " (select salary from employees_for_fallback_ut_test order by salary limit 1) s2)") - QueryTest.checkAnswer(df, Seq(Row(10023))) - val plans = df.queryExecution.executedPlan.asInstanceOf[AdaptiveSparkPlanExec].executedPlan.collect({ - case plan: ProjectExec => plan - case plan: TakeOrderedAndProjectExec => plan - }) - assert(plans.count(_.isInstanceOf[ProjectExec]) == 1, "the last stage containing projectExec should fallback") - assert(plans.count(_.isInstanceOf[TakeOrderedAndProjectExec]) == 1, "the last stage containing projectExec should fallback") - } - } - - test("Don't Fall back the last stage contains unsupported bnlj if NOT meeting the configured threshold") { + test("Don't Fall back the last stage contains supported bnlj if NOT meeting the configured threshold") { withSQLConf(("spark.omni.sql.columnar.wholeStage.fallback.threshold", "3"), (SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")) { val df = spark.sql("select age + salary from (select age, salary from (select age from employees_for_fallback_ut_test order by age limit 1) s1," + diff --git a/omnioperator/omniop-spark-extension/spark-extension-ut/spark33-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala b/omnioperator/omniop-spark-extension/spark-extension-ut/spark33-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala index 9b97295fc1a8dd7b92171ade804e5997094ec92d..2aa07b2e3d16d9a677b12792e5d57f0968748c1a 100644 --- a/omnioperator/omniop-spark-extension/spark-extension-ut/spark33-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala +++ b/omnioperator/omniop-spark-extension/spark-extension-ut/spark33-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala @@ -142,23 +142,7 @@ class FallbackStrategiesSuite extends QueryTest with SharedSparkSession { } } - - test("Fall back the last stage contains unsupported bnlj if meeting the configured threshold") { - withSQLConf(("spark.omni.sql.columnar.wholeStage.fallback.threshold", "2"), - (SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")) { - val df = spark.sql("select age + salary from (select age, salary from (select age from employees_for_fallback_ut_test order by age limit 1) s1," + - " (select salary from employees_for_fallback_ut_test order by salary limit 1) s2)") - QueryTest.checkAnswer(df, Seq(Row(10023))) - val plans = df.queryExecution.executedPlan.asInstanceOf[AdaptiveSparkPlanExec].executedPlan.collect({ - case plan: ProjectExec => plan - case plan: TakeOrderedAndProjectExec => plan - }) - assert(plans.count(_.isInstanceOf[ProjectExec]) == 1, "the last stage containing projectExec should fallback") - assert(plans.count(_.isInstanceOf[TakeOrderedAndProjectExec]) == 1, "the last stage containing projectExec should fallback") - } - } - - test("Don't Fall back the last stage contains unsupported bnlj if NOT meeting the configured threshold") { + test("Don't Fall back the last stage contains supported bnlj if NOT meeting the configured threshold") { withSQLConf(("spark.omni.sql.columnar.wholeStage.fallback.threshold", "3"), (SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")) { val df = spark.sql("select age + salary from (select age, salary from (select age from employees_for_fallback_ut_test order by age limit 1) s1," + diff --git a/omnioperator/omniop-spark-extension/spark-extension-ut/spark34-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala b/omnioperator/omniop-spark-extension/spark-extension-ut/spark34-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala index 9b97295fc1a8dd7b92171ade804e5997094ec92d..2aa07b2e3d16d9a677b12792e5d57f0968748c1a 100644 --- a/omnioperator/omniop-spark-extension/spark-extension-ut/spark34-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala +++ b/omnioperator/omniop-spark-extension/spark-extension-ut/spark34-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala @@ -142,23 +142,7 @@ class FallbackStrategiesSuite extends QueryTest with SharedSparkSession { } } - - test("Fall back the last stage contains unsupported bnlj if meeting the configured threshold") { - withSQLConf(("spark.omni.sql.columnar.wholeStage.fallback.threshold", "2"), - (SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")) { - val df = spark.sql("select age + salary from (select age, salary from (select age from employees_for_fallback_ut_test order by age limit 1) s1," + - " (select salary from employees_for_fallback_ut_test order by salary limit 1) s2)") - QueryTest.checkAnswer(df, Seq(Row(10023))) - val plans = df.queryExecution.executedPlan.asInstanceOf[AdaptiveSparkPlanExec].executedPlan.collect({ - case plan: ProjectExec => plan - case plan: TakeOrderedAndProjectExec => plan - }) - assert(plans.count(_.isInstanceOf[ProjectExec]) == 1, "the last stage containing projectExec should fallback") - assert(plans.count(_.isInstanceOf[TakeOrderedAndProjectExec]) == 1, "the last stage containing projectExec should fallback") - } - } - - test("Don't Fall back the last stage contains unsupported bnlj if NOT meeting the configured threshold") { + test("Don't Fall back the last stage contains supported bnlj if NOT meeting the configured threshold") { withSQLConf(("spark.omni.sql.columnar.wholeStage.fallback.threshold", "3"), (SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")) { val df = spark.sql("select age + salary from (select age, salary from (select age from employees_for_fallback_ut_test order by age limit 1) s1," + diff --git a/omnioperator/omniop-spark-extension/spark-extension-ut/spark35-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala b/omnioperator/omniop-spark-extension/spark-extension-ut/spark35-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala index 3847b29deb3c9d45dc485290014038722bbf3d36..8bafbb1ba25dea3c680c277204482b1ec3edcfdb 100644 --- a/omnioperator/omniop-spark-extension/spark-extension-ut/spark35-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala +++ b/omnioperator/omniop-spark-extension/spark-extension-ut/spark35-ut/src/test/scala/com/huawei/boostkit/spark/FallbackStrategiesSuite.scala @@ -142,23 +142,7 @@ class FallbackStrategiesSuite extends QueryTest with SharedSparkSession { } } - - test("Fall back the last stage contains unsupported bnlj if meeting the configured threshold") { - withSQLConf(("spark.omni.sql.columnar.wholeStage.fallback.threshold", "2"), - (SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")) { - val df = spark.sql("select age + salary from (select age, salary from (select age from employees_for_fallback_ut_test order by age limit 1) s1," + - " (select salary from employees_for_fallback_ut_test order by salary limit 1) s2)") - QueryTest.checkAnswer(df, Seq(Row(10023))) - val plans = df.queryExecution.executedPlan.asInstanceOf[AdaptiveSparkPlanExec].executedPlan.collect({ - case plan: ProjectExec => plan - case plan: TakeOrderedAndProjectExec => plan - }) - assert(plans.count(_.isInstanceOf[ProjectExec]) == 1, "the last stage containing projectExec should fallback") - assert(plans.count(_.isInstanceOf[TakeOrderedAndProjectExec]) == 1, "the last stage containing projectExec should fallback") - } - } - - test("Don't Fall back the last stage contains unsupported bnlj if NOT meeting the configured threshold") { + test("Don't Fall back the last stage contains supported bnlj if NOT meeting the configured threshold") { withSQLConf(("spark.omni.sql.columnar.wholeStage.fallback.threshold", "3"), (SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")) { val df = spark.sql("select age + salary from (select age, salary from (select age from employees_for_fallback_ut_test order by age limit 1) s1," +