Zouxxyy commented on PR #5023:
URL: https://github.com/apache/paimon/pull/5023#issuecomment-2677538967
> @Zouxxyy hello, wanna ask a question, if we load create table with defalt
value's logical plan, the default filed should put in where? In fields?
Since Paimon already has a prop for default values, we can just use that,
what do you think @JingsongLi
So I think we can implement it in the following steps:
1. Support Paimon's built-in default value syntax for spark reading (this is
actually your first PR)
```sql
CREATE TABLE T (id INT, name STRING)TBLPROPERTIES
('fields.name.default-value' = 'x');
```
2. Support Spark's DDL syntax (for Spark version 3.4 and above), which will
save 'fields.name.default-value' to Paimon's properties.
```sql
CREATE TABLE T (id INT, name STRING DEFAULT 'x');
```
--
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]