doris icon indicating copy to clipboard operation
doris copied to clipboard

[Enhancement] Support microseconds in function `unix_timestamp`

Open Gabriel39 opened this issue 2 years ago • 2 comments

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:

  1. CREATE TABLE datetime_table (date datetime(3) NOT NULL COMMENT '数据灌入日期时间' ) distributed by hash(date) buckets 1 properties("replication_num"="1");
  2. insert into datetime_table values ("2022-01-01 10:10:10.111");
  3. select unix_timestamp(date) from datetime_table;

image

In MySQL:

  1. CREATE TABLE datetime_table (date datetime(3) NOT NULL COMMENT '数据灌入日期时间' );
  2. insert into datetime_table values ("2022-01-01 10:10:10.111");
  3. select unix_timestamp(date) from datetime_table;

image

Solution

No response

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

Gabriel39 avatar Feb 09 '23 08:02 Gabriel39

Plz, assign it to me.

isHuangXin avatar Feb 15 '23 09:02 isHuangXin

I will work on it.

BBB-source avatar Mar 01 '23 08:03 BBB-source

I'd like to try it.

liangjiawei1110 avatar May 24 '23 07:05 liangjiawei1110

I'd like to try it.

Great! I will re-assign this issue to you

Gabriel39 avatar May 24 '23 08:05 Gabriel39

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

hongkun-Shao avatar Nov 19 '23 03:11 hongkun-Shao

Sorry but this issue is duplicated by https://github.com/apache/doris/issues/24382. will close this. @liangjiawei1110 @hongkun-Shao

zclllyybb avatar Nov 19 '23 08:11 zclllyybb