Fokko commented on code in PR #5624:
URL: https://github.com/apache/iceberg/pull/5624#discussion_r953901769


##########
docs/spark-ddl.md:
##########
@@ -365,6 +365,16 @@ For example, if you partition by days and move to 
partitioning by hours, overwri
 Be careful when dropping a partition field because it will change the schema 
of metadata tables, like `files`, and may cause metadata queries to fail or 
produce different results.
 {{< /hint >}}
 
+### `ALTER TABLE ... REPLACE PARTITION FIELD`
+
+A partition field can be replaced by a new partition field in a single 
metadata update by using `REPLACE PARTITION FIELD`:
+
+```sql
+ALTER TABLE prod.db.sample REPLACE PARTITION FIELD ts_day WITH days(timestamp)

Review Comment:
   ```suggestion
   ALTER TABLE prod.db.sample REPLACE PARTITION FIELD ts_day WITH days(ts)
   ```



##########
docs/spark-ddl.md:
##########
@@ -365,6 +365,16 @@ For example, if you partition by days and move to 
partitioning by hours, overwri
 Be careful when dropping a partition field because it will change the schema 
of metadata tables, like `files`, and may cause metadata queries to fail or 
produce different results.
 {{< /hint >}}
 
+### `ALTER TABLE ... REPLACE PARTITION FIELD`
+
+A partition field can be replaced by a new partition field in a single 
metadata update by using `REPLACE PARTITION FIELD`:
+
+```sql
+ALTER TABLE prod.db.sample REPLACE PARTITION FIELD ts_day WITH days(timestamp)
+-- use optional AS keyword to specify a custom name for the new partition 
field 
+ALTER TABLE prod.db.sample REPLACE PARTITION FIELD ts_day WITH days(timestamp) 
AS day_of_ts

Review Comment:
   ```suggestion
   ALTER TABLE prod.db.sample REPLACE PARTITION FIELD ts_day WITH days(ts) AS 
day_of_ts
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to