-
Notifications
You must be signed in to change notification settings - Fork 1.8k
perf: Optimize contains for scalar search arg
#19514
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
base: main
Are you sure you want to change the base?
Conversation
comphead
left a comment
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 @andygrove the numbers make huge sense to me, what prob concerns is DF using make_scalar_function in lots of places so the same problem can be relevant for others.
Would you mind adding more details what is the exact reason and what scalar/array combinations are the most trouble?
this info might be important how DF treats bultin functions now
Basically, the The three implementations of
|
The issue is that It would perhaps be better if it accepted |
Which issue does this PR close?
Rationale for this change
ContainsFuncusedmake_scalar_function, which expands scalar arguments into arrays before calling Arrow'scontainsfunction, bypassing Arrow's built-in scalar optimization.After optimizing for the scalar search case, performance is much better:
What changes are included in this PR?
Rewrote invoke_with_args to:
Are these changes tested?
Are there any user-facing changes?