jackylee-ch commented on code in PR #15814:
URL: https://github.com/apache/iceberg/pull/15814#discussion_r3014373053
##########
docs/docs/spark-ddl.md:
##########
@@ -326,6 +330,21 @@ ALTER TABLE prod.db.sample DROP COLUMN id;
ALTER TABLE prod.db.sample DROP COLUMN point.z;
```
+!!! warning "Hive Catalog Limitation"
+ When using a **Hive catalog**, dropping a column that is not the last
column in the table schema
+ may fail with an error from the Hive Metastore (HMS). This occurs because
HMS validates schema
+ changes by comparing column types **positionally** — dropping a middle
column shifts subsequent
+ columns, which HMS interprets as incompatible type changes
+ (`MetaStoreUtils#throwExceptionIfIncompatibleColTypeChange`).
+
+ To work around this, disable the HMS schema compatibility check by setting
+ `hive.metastore.disallow.incompatible.col.type.changes=false` in
`hive-site.xml`, or by passing
+ `--conf
spark.hadoop.hive.metastore.disallow.incompatible.col.type.changes=false` when
starting Spark.
Review Comment:
I have check remote HMS with version 3.1.3, which contains the HIVE-17832
and HIVE-17942, they still don't work. Thus, I updated the documentation as
follows.
- **Remote HMS:** Set this property in the HMS server's `hive-site.xml`.
- **Embedded HMS:** Add the equivalent property to the Hive catalog
configuration.
--
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]