-
Notifications
You must be signed in to change notification settings - Fork 875
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
refactor: convert *like_dyn
, *like_utf8_scalar_dyn
and *like_dict
functions to macros
#3411
Conversation
Edit: The benchmarks below are for No significant changes in benchmarks
|
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 wonder if this would be simpler as a declarative macro? Whilst I'm generally not a massive fan of them, I think they make sense in this case?
@tustvold not written a declarative macro so far. Let me look it up. Edit: I cannot instinctively say if declarative macro is better than current approach. I can update this PR with declarative macro and see which one is better. |
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.
Just a minor documentation nit, looks good thank you 😄
/// [`LargeStringArray`], or [`DictionaryArray`] with values | ||
/// [`StringArray`]/[`LargeStringArray`]. | ||
/// | ||
/// See the documentation on [`like_utf8`] for more details. |
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 this should be ilike_utf8
for the ilike kernels. How about documenting the functions outside the macros?
e.g.
/// See the documentation on [`like_utf8`] for more details.
dyn_function!(like_dyn, like_utf8, like_dict);
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.
The *like_utf8
name is already captured in the macro. So I just added a document line. I just don't see the benefits of comment outside the macro vs inside it. So I left the comments inside the macro.
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 changed the documentation back to like_utf8
as I realized it is on purpose. The current code points to like_utf8
in all functions as its the only function with an example.
*like_dyn
refactor*like_dyn
, *like_utf8_scalar_dyn
and *like_dict
functions to macros
Benchmark runs are scheduled for baseline = 2408bb2 and contender = b371f41. b371f41 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Part of #3296
What changes are included in this PR?
Three declarative macro added to generate 12 functions below.
*like_dyn
functions:like_dyn
,nlike_dyn
,ilike_dyn
andnilike_dyn
.*like_utf8_scalar_dyn
functions:like_utf8_scalar_dyn
,nlike_utf8_scalar_dyn
,ilike_utf8_scalar_dyn
andnilike_utf8_scalar_dyn
.*like_dict
functions:like_dict
,nlike_dict
,ilike_dict
andnilike_dict
.Are there any user-facing changes?
No.