apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
11.96k stars 3.14k forks source link

[Doris-Future] Support some short-circuit datetime function format #31706

Open zclllyybb opened 4 months ago

zclllyybb commented 4 months ago

Search before asking

Description

Considering the code of str_to_date and date_format, now in BE we deal with the input data line by line. And for one cell we parse the format per %. Actually for some usual formats(like "%Y-%m-%d", "%H:%i:%s" and so on) we can use an individual function to directly set the result time or string. And do not need to parse the format string. Furthermore, maybe we can use SIMD to accelerate this.

Use case

detect some usual format string for str_to_date and date_format. then use a new function to directly deal with the input column to get the result.

Related issues

No response

Are you willing to submit PR?

Code of Conduct

CSTGluigi commented 4 months ago

I want to try this