File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1 Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ import org.apache.spark.sql.execution.command
21
21
22
22
trait AlterTableDropPartitionSuiteBase extends command.AlterTableDropPartitionSuiteBase {
23
23
override protected val notFullPartitionSpecErr = " The following partitions not found in table"
24
+
25
+ test(" purge partition data" ) {
26
+ withNamespaceAndTable(" ns" , " tbl" ) { t =>
27
+ sql(s " CREATE TABLE $t (id bigint, data string) $defaultUsing PARTITIONED BY (id) " )
28
+ sql(s " ALTER TABLE $t ADD PARTITION (id = 1) " )
29
+ checkPartitions(t, Map (" id" -> " 1" ))
30
+ sql(s " ALTER TABLE $t DROP PARTITION (id = 1) PURGE " )
31
+ checkPartitions(t) // no partitions
32
+ }
33
+ }
24
34
}
25
35
26
36
class AlterTableDropPartitionSuite
You can’t perform that action at this time.
0 commit comments