You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "zhuangchong (via GitHub)" <gi...@apache.org> on 2023/07/28 08:10:40 UTC
[GitHub] [incubator-paimon] zhuangchong commented on a diff in pull request #1676: [spark] Support spark to modify the default value of the column.
zhuangchong commented on code in PR #1676:
URL: https://github.com/apache/incubator-paimon/pull/1676#discussion_r1277247038
##########
docs/content/how-to/altering-tables.md:
##########
@@ -413,6 +413,48 @@ Supported Type Conversions.
{{< generated/column_type_conversion >}}
+## Changing Column Default Value
+
+The following SQL changes default value of column `col_a` to `0`.
+
+{{< tabs "change-column-default-value" >}}
+
+{{< tab "Flink" >}}
+
+```sql
+ALTER TABLE my_table SET (
+ 'fields.col_a.default-value' = '0'
+);
+```
+
+{{< /tab >}}
+
+{{< tab "Spark3" >}}
+
+```sql
+-- alter column
+ALTER TABLE my_table ALTER COLUMN col_a SET DEFAULT 0;
+
+-- or set properties
+ALTER TABLE my_table SET TBLPROPERTIES (
+ 'fields.col_a.default-value' = '0'
+);
+```
+
+{{< /tab >}}
+
+{{< tab "Trino" >}}
+
+```sql
+ALTER TABLE my_table SET PROPERTIES fields.col_a.default-value = '0';
Review Comment:
I copied this part.
https://github.com/apache/incubator-paimon/blob/cfddb74dd34fc51ff8a76b46bf54a3ed8e597d5d/docs/content/how-to/altering-tables.md?plain=1#L55-L61
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org