Skip to content

Commit 0e18496

Browse files
baishuoliancheng
authored andcommitted
Update HiveQuerySuite.scala
1 parent 60f70aa commit 0e18496

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
@@ -255,6 +255,18 @@ class HiveQuerySuite extends HiveComparisonTest {
255255
|insert overwrite table src_lv2 SELECT key, D.* lateral view explode(array(key+3, key+4)) D as CX
256256
""".stripMargin)
257257

258+
createQueryTest("dynamice partiton",
259+
"""
260+
|drop table IF EXISTS dynamic_part_table;
261+
|create table dynamic_part_table(intcol int) partitioned by (partcol1 int, partcol2 int);
262+
|set hive.exec.dynamic.partition.mode=nonstrict;
263+
|insert into table dynamic_part_table partition(partcol1, partcol2) select 1, 1, 1 from src where key=150;
264+
|insert into table dynamic_part_table partition(partcol1, partcol2) select 1, NULL, 1 from src where key=150;
265+
|insert into table dynamic_part_table partition(partcol1, partcol2) select 1, 1, NULL from src where key=150;
266+
|insert into table dynamic_part_table partition(partcol1, partcol2) select 1, NULL, NULL from src where key=150;
267+
|drop table IF EXISTS dynamic_part_table;
268+
""".stripMargin)
269+
258270
createQueryTest("lateral view5",
259271
"FROM src SELECT explode(array(key+3, key+4))")
260272

0 commit comments

Comments
 (0)