Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/2226#discussion_r17888820
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala
---
@@ -522,6 +523,52 @@ class HiveQuerySuite extends HiveComparisonTest {
case class LogEntry(filename: String, message: String)
case class LogFile(name: String)
+ createQueryTest("dynamic_partition",
+ """
+ |DROP TABLE IF EXISTS dynamic_part_table;
+ |CREATE TABLE dynamic_part_table(intcol INT) PARTITIONED BY
(partcol1 INT, partcol2 INT);
+ |
+ |SET hive.exec.dynamic.partition.mode=nonstrict;
+ |
+ |INSERT INTO TABLE dynamic_part_table PARTITION(partcol1, partcol2)
+ |SELECT 1, 1, 1 FROM src WHERE key=150;
+ |
+ |INSERT INTO TABLE dynamic_part_table PARTITION(partcol1, partcol2)
+ |SELECT 1, NULL, 1 FROM src WHERE key=150;
+ |
+ |INSERT INTO TABLE dynamic_part_table PARTITION(partcol1, partcol2)
+ |SELECT 1, 1, NULL FROM src WHERE key=150;
+ |
+ |INSERT INTO TABLe dynamic_part_table PARTITION(partcol1, partcol2)
+ |SELECT 1, NULL, NULL FROM src WHERE key=150;
+ |
+ |DROP TABLE IF EXISTS dynamic_part_table;
+ """.stripMargin)
--- End diff --
Added a test to validate dynamic partitioning folder layout by loading each
partition from specific partition folder and check the contents.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]