paimon icon indicating copy to clipboard operation
paimon copied to clipboard

[spark] Support drop partition from top level

Open baiyangtx opened this issue 4 months ago • 3 comments

Purpose

To support drop partition from top level in spark if partition spec with one more fields

example:

CREATE TABLE tbl (id int, data string) 
USING paimon 
PARTITIONED BY (dt string, hour string, event string);

ALTER TABLE tbl DROP PARTITION (dt='2023-01-01');

Tests

  • DDLTestBase.scala
  • DropPartitionParserTest.java
  • PaimonPartitionManagementTest.scala

API and Format

No

Documentation

No

baiyangtx avatar Aug 26 '25 13:08 baiyangtx

Can have a look at https://github.com/apache/spark/pull/48108

Zouxxyy avatar Aug 27 '25 14:08 Zouxxyy

Can have a look at apache/spark#48108

It looks like the Spark community hasn’t accepted this PR. Could we implement the feature within Paimon instead? From a data-ops perspective, cascading deletes based on parent partitions is a very useful capability.

baiyangtx avatar Sep 02 '25 11:09 baiyangtx

Would you mind have a look? @Zouxxyy @JingsongLi

baiyangtx avatar Sep 03 '25 03:09 baiyangtx

Can have a look at apache/spark#48108

It looks like the Spark community hasn’t accepted this PR. Could we implement the feature within Paimon instead? From a data-ops perspective, cascading deletes based on parent partitions is a very useful capability.

+1, Can we support in paimon first to enable drop from the top level ? I think it's a useful feature to enhance the paimon spark operation cc @Zouxxyy @JingsongLi

Aitozi avatar Nov 28 '25 02:11 Aitozi