-
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
Implement native support StringView for REPEAT
#11962
Conversation
Signed-off-by: Tai Le Manh <[email protected]>
1f76b9c
to
2cdf18b
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.
Thank you very much @tlm365 -- this is a very nice first contribution 🏅
Ok(Arc::new(result) as ArrayRef) | ||
} | ||
|
||
fn repeat_common(string: Option<&str>, number: Option<i64>) -> Option<String> { |
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 think you could make this perform much better by avoiding the String
and instead building the output directly with StringViewBuilder
https://docs.rs/arrow/latest/arrow/array/type.StringViewBuilder.html
here is an example of how to use them: apache/arrow-rs#6240
I realize this just follows the same model as was here. However, if we are messing with the code it might be nice to make it faster while we are at it
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.
@alamb thanks so much for reviewing. I will take a look!
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.
Thank you -- I filed #11990 to track the idea
I took the liberty of merging up from main and running |
Which issue does this PR close?
Closes #11914 and part of #11790.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?