rdblue commented on a change in pull request #2101:
URL: https://github.com/apache/iceberg/pull/2101#discussion_r560506957
##########
File path: site/docs/spark.md
##########
@@ -258,6 +258,38 @@ ALTER TABLE prod.db.sample DROP COLUMN id
ALTER TABLE prod.db.sample DROP COLUMN point.z
```
+### `ALTER TABLE ... ADD PARTITION FIELD`
+
+```sql
+ALTER TABLE prod.db.sample ADD PARTITION FIELD catalog -- identity transform
+ALTER TABLE prod.db.sample ADD PARTITION FIELD bucket(16, id)
+ALTER TABLE prod.db.sample ADD PARTITION FIELD truncate(data, 4)
+ALTER TABLE prod.db.sample ADD PARTITION FIELD years(ts)
+-- use optional AS keyword to specify a custom name for the partition field
+ALTER TABLE prod.db.sample ADD PARTITION FIELD bucket(16, id) AS shard
+```
+
+### `ALTER TABLE ... DROP PARTITION FIELD`
Review comment:
Both of these new commands should have a warning that changing
partitioning will change the behavior of dynamic writes, which overwrite any
partition that is written to. If you partition by days and move to partitioning
by hours, overwrites will overwrite hourly partitions but not days anymore.
Definitely something to be aware of and a good reason to use `MERGE INTO` or
the new `DataFrameWriterV2` API with an explicit overwrite filter.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]