Skip to content

[Enhancement] date functions don't support bigint param. eg: FROM_UNIXTIME()、seconds_add() ... #23089

@alanredsheep

Description

@alanredsheep

Search before asking

  • I had searched in the issues and found no similar issues.

Version

1.2.6-rc03

What's Wrong?

Here is the from_unixtime docs on doris.

DATETIME FROM_UNIXTIME(INT unix_timestamp[, VARCHAR string_format])

It says unix_timestamp should between 0 and 253402271999.
But the data type of param "unix_timestamp" is INT. So in fact the param "unix_timestamp" cannot bigger than Interger.MAX(2147483647), otherwise from_unxitime() will return NULL.

There're more functions which have problem like from_unxitime(), such as seconds_sub()、seconds_add()、minutes_sub()、minutes_add()、microseconds_add()、date_add()、date_sub()、TIMESTAMPADD().

What You Expected?

seconds_sub()、seconds_add()、minutes_sub()、minutes_add()、microseconds_add()、date_add()、date_sub()、TIMESTAMPADD()、FROM_UNIXTIME() should support bigint param.

DATETIME FROM_UNIXTIME(BIGINT unix_timestamp[, VARCHAR string_format])

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions