-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support 1 or 3 arg in generate_series() UDTF #13856
base: main
Are you sure you want to change the base?
Conversation
935610b
to
93520be
Compare
93520be
to
5803583
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @UBarney. Overall looks good to me but some minor comments.
cc @2010YOUY01
#[derive(Debug, Clone)] | ||
enum GenSeriesArgs { | ||
ContainsNull, | ||
AllNotNullArgs { start: i64, end: i64, step: i64 }, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to add some doc for the enum and its variants.
ContainsNull, | ||
AllNotNullArgs { start: i64, end: i64, step: i64 }, | ||
} | ||
|
||
/// Table that generates a series of integers from `start`(inclusive) to `end`(inclusive) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the comment should be updated for step
.
start: Option<i64>, | ||
// None if input is Null | ||
end: Option<i64>, | ||
args: GenSeriesArgs, | ||
} | ||
|
||
/// Table state that generates a series of integers from `start`(inclusive) to `end`(inclusive) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. It should be updated.
Which issue does this PR close?
Closes #13615.
Rationale for this change
What changes are included in this PR?
GenerateSeriesTable
step
field toGenerateSeriesState
, and added support for generating series with custom stepAre these changes tested?
sqllogictests for generate_series() UDTF
Are there any user-facing changes?
No