Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Function enhancement] array_generate to support date/datetime as input and interval as step. #49575

Open
DeveloperZJQ opened this issue Aug 8, 2024 · 4 comments

Comments

@DeveloperZJQ
Copy link

DeveloperZJQ commented Aug 8, 2024

Feature request

The time series generation function Sequence(start, stop, step) available in Trino/Presto does not exist in StarRocks, and there is a desire to have it added.

for example :

trino url:https://trino.io/docs/current/functions/array.html
trino github url:https://github.com/trinodb/trino/blob/master/core/trino-main/src/main/java/io/trino/operator/scalar/timestamp/SequenceIntervalDayToSecond.java

sequence(start, stop)
Generate a sequence of dates from start date to stop date, incrementing by 1 day if start date is less than or equal to stop date, otherwise -1 day.

sequence(start, stop, step)
Generate a sequence of dates from start to stop, incrementing by step. The type of step can be either INTERVAL DAY TO SECOND or INTERVAL YEAR TO MONTH.

sequence(start, stop, step)
Generate a sequence of timestamps from start to stop, incrementing by step. The type of step can be either INTERVAL DAY TO SECOND or INTERVAL YEAR TO MONTH.

If there are any inadequacies in the description, please reply. Thanks

@wangsimo0
Copy link
Contributor

wow thanks for your issue, your description is very helpful!
starrocks do have a function named array_generate https://docs.starrocks.io/docs/sql-reference/sql-functions/array-functions/array_generate/ , it generate arrays in step like sequence. however it doesn't support date/datetime input parameter and do not support interval as a step either.
and it is necessary to improve it.

@wangsimo0 wangsimo0 changed the title The time series generation function Sequence(start, stop, step) available in Trino/Presto does not exist in StarRocks, and there is a desire to have it added. [Function enhancement] array_generate to support date/datetime as input and interval as step. Aug 9, 2024
@SoraNimi
Copy link

SoraNimi commented Aug 17, 2024

Can I pick this issue? @wangsimo0 @kateshaowanjou

@Lrabbit125
Copy link
Contributor

Can I pick this issue? @wangsimo0 @kateshaowanjou

Hi @SoraNimi! I noticed your interest in this issue and would like to ask if you would be open to transferring the responsibility to me. I’ve been working on this recently. I would greatly appreciate your help in making this transfer.

@SoraNimi
Copy link

Can I pick this issue? @wangsimo0 @kateshaowanjou

Hi @SoraNimi! I noticed your interest in this issue and would like to ask if you would be open to transferring the responsibility to me. I’ve been working on this recently. I would greatly appreciate your help in making this transfer.

I am working on another issue, and there has been no progress on this issue. You can seek the corresponding person to assign it to you.

@murphyatwork murphyatwork added the good first issue Good for newcomers label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants