liutang123 opened a new issue, #46902: URL: https://github.com/apache/doris/issues/46902
### 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 2.1 ### What's Wrong? ``` CREATE TABLE `aec` ( `CD` date NOT NULL, `PI` varchar(160) NOT NULL ) ENGINE=OLAP UNIQUE KEY(`CD`, `PI`) PARTITION BY RANGE(`CD`) (PARTITION p_0 VALUES [('0000-01-01'), ('2018-01-01')), PARTITION p_1 VALUES [('2028-01-01'), ('9999-01-01'))) DISTRIBUTED BY HASH(`CD`, `PI`) BUCKETS 2 PROPERTIES ( "replication_allocation" = "tag.location.default: 1" ); insert into aec (`CD`, `PI`) values ('2028-01-01', '2028-01-01__wer1q23rads'); select PI, trim(PI),cast(PI AS datetimev2),cast(trim(PI) AS datetimev2) from aec where CD = trim('2028-01-01_')\G*************************** 1. row *************************** PI: 2028-01-01__wer1q23rads trim(`PI`): 2028-01-01__wer1q23rads CAST(`PI` AS datetimev2(0)): 2028-01-01 00:00:00 CAST(trim(`PI`) AS datetimev2(0)): 2028-01-01 00:00:00 ``` ### What You Expected? The value `2028-01-01__wer1q23rads` is a invalid date. ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [X] 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: commits-unsubscr...@doris.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org