davidyuan1223 commented on PR #5023:
URL: https://github.com/apache/paimon/pull/5023#issuecomment-2677570836
> > @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?
>
> @davidyuan1223 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' = 'default v');
>
> -- check
> INSERT INTO t (id) values (1);
> SELECT * FROM t;
> ```
>
> 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 'default v');
> ```
because i saw the pr https://issues.apache.org/jira/browse/SPARK-38334 which
implementation metadata field, so i implementation a pr with the metadata field
in paimon metadata file, shall we use this? or keep the properties?
--
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]