[Enhancement] Support microseconds in function `unix_timestamp`
Search before asking
- [X] I had searched in the issues and found no similar issues.
Description
Now Doris already supports DATETIMEV2 which could have precision up to microseconds. But function unix_timestamp still can not process those microseconds. So we need this feature for users who need timestamp with microseconds.
In Doris:
-
CREATE TABLEdatetime_table(datedatetime(3) NOT NULL COMMENT '数据灌入日期时间' ) distributed by hash(date) buckets 1 properties("replication_num"="1"); -
insert intodatetime_tablevalues ("2022-01-01 10:10:10.111"); -
select unix_timestamp(date) from datetime_table;

In MySQL:
-
CREATE TABLEdatetime_table(datedatetime(3) NOT NULL COMMENT '数据灌入日期时间' ); -
insert intodatetime_tablevalues ("2022-01-01 10:10:10.111"); -
select unix_timestamp(date) from datetime_table;

Solution
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
Plz, assign it to me.
I will work on it.
I'd like to try it.
I'd like to try it.
Great! I will re-assign this issue to you
May I ask if anyone else is dealing with this issue? If not, could you assign it to me to try? However, since I am new to the community, I cannot guarantee that I can complete it, but I will do my best. @Gabriel39
Sorry but this issue is duplicated by https://github.com/apache/doris/issues/24382. will close this. @liangjiawei1110 @hongkun-Shao