-
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 performance of REPEAT functions #12015
Conversation
Signed-off-by: Tai Le Manh <[email protected]>
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 @tlm365 this PR looks promising. Would you mind adding bench results to the PR description?
Signed-off-by: Tai Le Manh <[email protected]>
Signed-off-by: Tai Le Manh <[email protected]>
d95992a
to
230281c
Compare
(Some(_), Some(_)) => Some("".to_string()), | ||
_ => None, | ||
} | ||
.for_each(|(string, number)| match (string, number) { |
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.
👏 -- very nice
@@ -251,6 +252,22 @@ impl<'a> ColumnarValueRef<'a> { | |||
} | |||
} | |||
|
|||
pub trait StringArrayType<'a>: ArrayAccessor<Item = &'a str> + Sized { |
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.
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.
#12027 is a PR to document this trait and how to use it
Which issue does this PR close?
Closes #11990.
Rationale for this change
Refactor code and improve performance.
What changes are included in this PR?
repeat
function and benchmark.Are these changes tested?
Yes
Are there any user-facing changes?
No
Benchmark stats on my local machine: