rotkang opened a new issue, #21758:
URL: https://github.com/apache/doris/issues/21758

   ### 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
   
   Release 2.0.0 Alpha1
   
   ### What's Wrong?
   
   CREATE TABLE IF NOT EXISTS test.example_tbl
   (
       `timestamp` datev2 NOT NULL COMMENT "日志时间",
       `type` INT NOT NULL COMMENT "日志类型",
       `error_code` INT COMMENT "错误码",
       `error_msg` VARCHAR(1024) COMMENT "错误详细信息",
       `op_id` BIGINT COMMENT "负责人id",
       `op_time` DATETIME COMMENT "处理时间"
   )
   DUPLICATE KEY(`timestamp`, `type`, `error_code`)
   DISTRIBUTED BY HASH(`type`) BUCKETS 1;
   
   
   create table test.example_tbl_bak like test.example_tbl
   
   错误信息如下:
   SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = Failed to execute CREATE 
TABLE LIKE example_tbl. Reason: errCode = 2, detailMessage = Disable to create 
table with `DATE` type columns, please use `DATEV2`.
   
   ### What You Expected?
   
   正常应该能创建成功的。
   如同以下语句一样:
   create table test.example_tbl_bak as select * from test.example_tbl where 1=2
   
   ### How to Reproduce?
   
   CREATE TABLE IF NOT EXISTS test.example_tbl
   (
       `timestamp` datev2 NOT NULL COMMENT "日志时间",
       `type` INT NOT NULL COMMENT "日志类型",
       `error_code` INT COMMENT "错误码",
       `error_msg` VARCHAR(1024) COMMENT "错误详细信息",
       `op_id` BIGINT COMMENT "负责人id",
       `op_time` DATETIME COMMENT "处理时间"
   )
   DUPLICATE KEY(`timestamp`, `type`, `error_code`)
   DISTRIBUTED BY HASH(`type`) BUCKETS 1;
   
   
   create table test.example_tbl_bak like test.example_tbl
   
   ### 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]

Reply via email to