JueLance opened a new issue, #31503: URL: https://github.com/apache/doris/issues/31503
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version Doris version doris-2.0.3-rc06-37d31a5 ### What's Wrong? I am going to create table, a column named sale_date which date type is date, and I want set it's default value to current date, sample sql like below: use test; CREATE TABLE IF NOT EXISTS sale_detail ( id int not null comment "id", sale_date date NOT NULL COMMENT "销售时间", update_date DateV2 not null ) PARTITION BY RANGE(sale_date) ( PARTITION P_202111 VALUES [('2021-11-01'), ('2021-12-01')) ) DISTRIBUTED BY HASH(id) BUCKETS 10 PROPERTIES ( "replication_num" = "3", "bloom_filter_columns"="id", "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "MONTH", "dynamic_partition.time_zone" = "Asia/Shanghai", "dynamic_partition.start" = "-2147483648", "dynamic_partition.end" = "2", "dynamic_partition.prefix" = "P_", "dynamic_partition.replication_num" = "3", "dynamic_partition.buckets" = "3" ); ALTER TABLE test.sale_detail MODIFY COLUMN sale_date Date DEFAULT CURRENT_DATE NOT NULL; **Or set default value directly when create table:** CREATE TABLE IF NOT EXISTS sale_detail ( id int not null comment "id", sale_date date NOT NULL default CURRENT_DATE COMMENT "销售时间", update_date DateV2 not null ) ... No mater which case, the sql has run failed.  ### What You Expected? I am able to set a default value for Date type. ### How to Reproduce? Please run sql in above. ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
