-
- Downloads
[SPARK-18173][SQL] data source tables should support truncating partition
## What changes were proposed in this pull request? Previously `TRUNCATE TABLE ... PARTITION` will always truncate the whole table for data source tables, this PR fixes it and improve `InMemoryCatalog` to make this command work with it. ## How was this patch tested? existing tests Author: Wenchen Fan <wenchen@databricks.com> Closes #15688 from cloud-fan/truncate. (cherry picked from commit 46b2e499) Signed-off-by:Reynold Xin <rxin@databricks.com>
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala 19 additions, 4 deletions...g/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala 11 additions, 0 deletions...che/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala 11 additions, 5 deletions...scala/org/apache/spark/sql/execution/command/tables.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala 41 additions, 8 deletions...ala/org/apache/spark/sql/execution/command/DDLSuite.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala 64 additions, 0 deletions...la/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
Loading
Please register or sign in to comment