Skip to content

Commit ca94d7b

Browse files
ulysses-youpan3793
authored andcommitted
[KYUUBI apache#807] Make kyuubi-extension-spark_3.1 test pass with Spark 3.2.0-snapshot
<!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html 2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'. 3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'. --> ### _Why are the changes needed?_ <!-- Please clarify why the changes are needed. For instance, 1. If you add a feature, you can talk about the use case of it. 2. If you fix a bug, you can clarify why it is a bug. --> Make this extesion more robust. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request Closes apache#807 from ulysses-you/sql-extension. Closes apache#807 27155c1 [ulysses-you] fix Authored-by: ulysses-you <ulyssesyou18@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 4790cee commit ca94d7b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dev/kyuubi-extension-spark_3.1/src/test/scala/org/apache/spark/sql/KyuubiExtensionSuite.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class KyuubiExtensionSuite extends QueryTest with SQLTestUtils with AdaptiveSpar
3939
"org.apache.kyuubi.sql.KyuubiSparkSQLExtension")
4040
.config(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")
4141
.config("spark.hadoop.hive.exec.dynamic.partition.mode", "nonstrict")
42+
.config("spark.hadoop.hive.metastore.client.capability.check", "false")
4243
.config("spark.ui.enabled", "false")
4344
.enableHiveSupport()
4445
.getOrCreate()
@@ -328,6 +329,7 @@ class KyuubiExtensionSuite extends QueryTest with SQLTestUtils with AdaptiveSpar
328329
SQLConf.SHUFFLE_PARTITIONS.key -> "3",
329330
KyuubiSQLConf.FINAL_STAGE_CONFIG_ISOLATION.key -> "true",
330331
"spark.sql.adaptive.advisoryPartitionSizeInBytes" -> "1",
332+
"spark.sql.adaptive.coalescePartitions.minPartitionSize" -> "1",
331333
"spark.sql.finalStage.adaptive.advisoryPartitionSizeInBytes" -> "10000000") {
332334

333335
// use loop to double check final stage config doesn't affect the sql query each other
@@ -372,10 +374,10 @@ class KyuubiExtensionSuite extends QueryTest with SQLTestUtils with AdaptiveSpar
372374
// test ReusedExchange
373375
checkPartitionNum(
374376
"""
375-
|SELECT t0.c2 FROM (
376-
|SELECT t1.c1, count(*) as c2 FROM t1 GROUP BY t1.c1
377+
|SELECT /*+ REPARTITION */ t0.c2 FROM (
378+
|SELECT t1.c1, (count(*) + c1) as c2 FROM t1 GROUP BY t1.c1
377379
|) t0 JOIN (
378-
|SELECT t1.c1, count(*) as c2 FROM t1 GROUP BY t1.c1
380+
|SELECT t1.c1, (count(*) + c1) as c2 FROM t1 GROUP BY t1.c1
379381
|) t1 ON t0.c2 = t1.c2
380382
|""".stripMargin,
381383
3,

0 commit comments

Comments
 (0)