Skip to content

Commit d452eb3

Browse files
baishuoliancheng
authored andcommitted
Update HiveQuerySuite.scala
1 parent 37c603b commit d452eb3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,18 @@ class HiveQuerySuite extends HiveComparisonTest {
271271
|insert overwrite table src_lv2 SELECT key, D.* lateral view explode(array(key+3, key+4)) D as CX
272272
""".stripMargin)
273273

274+
createQueryTest("dynamice partiton",
275+
"""
276+
|drop table IF EXISTS dynamic_part_table;
277+
|create table dynamic_part_table(intcol int) partitioned by (partcol1 int, partcol2 int);
278+
|set hive.exec.dynamic.partition.mode=nonstrict;
279+
|insert into table dynamic_part_table partition(partcol1, partcol2) select 1, 1, 1 from src where key=150;
280+
|insert into table dynamic_part_table partition(partcol1, partcol2) select 1, NULL, 1 from src where key=150;
281+
|insert into table dynamic_part_table partition(partcol1, partcol2) select 1, 1, NULL from src where key=150;
282+
|insert into table dynamic_part_table partition(partcol1, partcol2) select 1, NULL, NULL from src where key=150;
283+
|drop table IF EXISTS dynamic_part_table;
284+
""".stripMargin)
285+
274286
createQueryTest("lateral view5",
275287
"FROM src SELECT explode(array(key+3, key+4))")
276288

0 commit comments

Comments
 (0)