This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 1bf8989b26 [doc] Document
hive.metastore.disallow.incompatible.col.type.changes for Flink and Spark client
1bf8989b26 is described below
commit 1bf8989b26609bae59cf8a7bedc4de4db18acde6
Author: Jingsong <[email protected]>
AuthorDate: Thu Dec 19 19:05:29 2024 +0800
[doc] Document hive.metastore.disallow.incompatible.col.type.changes for
Flink and Spark client
---
docs/content/flink/sql-alter.md | 11 +++++++++--
docs/content/spark/sql-alter.md | 10 +++++++---
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/docs/content/flink/sql-alter.md b/docs/content/flink/sql-alter.md
index 6c3186b4af..e9c80f3167 100644
--- a/docs/content/flink/sql-alter.md
+++ b/docs/content/flink/sql-alter.md
@@ -96,8 +96,7 @@ ALTER TABLE my_table RENAME c0 TO c1;
## Dropping Columns
-The following SQL drops two columns `c1` and `c2` from table `my_table`. In
hive catalog, you need to ensure disable
`hive.metastore.disallow.incompatible.col.type.changes` in your hive server,
-otherwise this operation may fail, throws an exception like `The following
columns have types incompatible with the existing columns in their respective
positions`.
+The following SQL drops two columns `c1` and `c2` from table `my_table`.
```sql
ALTER TABLE my_table DROP (c1, c2);
@@ -107,6 +106,14 @@ ALTER TABLE my_table DROP (c1, c2);
To drop a column in a row type, see [Changing Column
Type](#changing-column-type).
{{< /hint >}}
+In hive catalog, you need to ensure:
+
+1. disable `hive.metastore.disallow.incompatible.col.type.changes` in your
hive server
+2. or set `hadoop.hive.metastore.disallow.incompatible.col.type.changes=false`
in your paimon catalog.
+
+Otherwise this operation may fail, throws an exception like `The following
columns have types incompatible with the
+existing columns in their respective positions`.
+
## Dropping Partitions
The following SQL drops the partitions of the paimon table.
diff --git a/docs/content/spark/sql-alter.md b/docs/content/spark/sql-alter.md
index 149975ef93..81eff674f1 100644
--- a/docs/content/spark/sql-alter.md
+++ b/docs/content/spark/sql-alter.md
@@ -174,9 +174,13 @@ The following SQL drops a nested column `f2` from a struct
type, which is the va
ALTER TABLE my_table DROP COLUMN v.value.f2;
```
-For hive catalog, you need to disable
`'hive.metastore.disallow.incompatible.col.type.changes'`, otherwise this
-operation may fail, throws an exception like `'The following columns have
types incompatible with the existing columns
- in their respective positions'`.
+In hive catalog, you need to ensure:
+
+1. disable `hive.metastore.disallow.incompatible.col.type.changes` in your
hive server
+2. or `spark-sql --conf
spark.hadoop.hive.metastore.disallow.incompatible.col.type.changes=false` in
your spark.
+
+Otherwise this operation may fail, throws an exception like `The following
columns have types incompatible with the
+existing columns in their respective positions`.
## Dropping Partitions