-
- Downloads
[SPARK-16033][SQL] insertInto() can't be used together with partitionBy()
## What changes were proposed in this pull request? When inserting into an existing partitioned table, partitioning columns should always be determined by catalog metadata of the existing table to be inserted. Extra `partitionBy()` calls don't make sense, and mess up existing data because newly inserted data may have wrong partitioning directory layout. ## How was this patch tested? New test case added in `InsertIntoHiveTableSuite`. Author: Cheng Lian <lian@databricks.com> Closes #13747 from liancheng/spark-16033-insert-into-without-partition-by.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala 9 additions, 3 deletions...src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertIntoHiveTableSuite.scala 37 additions, 0 deletions.../org/apache/spark/sql/hive/InsertIntoHiveTableSuite.scala
Please register or sign in to comment