JingsongLi commented on code in PR #8730: URL: https://github.com/apache/paimon/pull/8730#discussion_r3612129865
########## docs/docs/spark/sql-ddl.md: ########## @@ -206,6 +206,52 @@ CREATE TABLE my_table ( ); ``` +### Manage Format Table Partitions + +For managed Format Tables, whose `metastore.partitioned-table` option is `true`, partition +metadata is stored in the catalog and Spark supports the standard partition DDL: + +```sql +ALTER TABLE my_table ADD PARTITION (dt='2025-01-01'); +ALTER TABLE my_table DROP PARTITION (dt='2025-01-01'); +MSCK REPAIR TABLE my_table; +SHOW PARTITIONS my_table; +``` + +On a Format Table that is not managed, `ADD PARTITION`, `DROP PARTITION` and +`MSCK REPAIR TABLE` fail with an error. + +`SHOW PARTITIONS` throws an error when the number of partitions exceeds +`spark.paimon.format-table.show-partitions.max-results` (default: 10000). For larger tables, use Review Comment: Hive behavior? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
