-
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
Improve rpad udf by using a GenericStringBuilder #12070
Conversation
Sorry for the late update, got some personal issue last week |
lgtm |
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.
Likewise this looks good to me -- thank you @Lordworms
We just need to sort out the cargo fmt
CI Error
maybe we could make two separate macros? Or use StringArrayType
to make generic functions instead -- see #12027
Sure |
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.
Awesome -- very nice @Lordworms
Thank you for the review and help @Omega359
let length = if length < 0 { 0 } else { length as usize }; | ||
let graphemes = string.graphemes(true).collect::<Vec<&str>>(); | ||
let fill_chars = fill.chars().collect::<Vec<char>>(); | ||
pub fn rpad<StringArrayLen: OffsetSizeTrait, FillArrayLen: OffsetSizeTrait>( |
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.
😍 -- 100% for no more macros!
Which issue does this PR close?
Closes #11997
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?