-
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
Switch datafusion to using eq_dyn_scalar
, etc kernels
#1610
Comments
I'll give this a shot |
@matthewmturner note you'll likely hit some types that datafusion covers that arrow does not (yet) such as |
@alamb ive been looking through the existing code and im a bit confused. specifically, when looking at the below, it seems the array + scalar ops are not using the scalar arrow kernels. is my understanding correct? if so, could you provide color on that and if we should be moving to use those? |
Specifically, this bit of macro magic: So when invoked with paste::expr! {[<$OP _scalar>]} Becomes lt_scalar Does that help @matthewmturner ? |
@alamb ah yes i did trace that all the way back but didnt realize that |
@alamb I'm wondering if we could just remove |
I think this is a good avenue to try -- my suspicion is you won't be able to remove the |
@alamb im not sure we can remove the type dispatch in Im still playing with it but I was thinking of adding new functions like
Does this make sense? |
Yes I think that makes sense to me. I think they key outcome of this PR should be that |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I would (primarily) like DataFusion to stop unpacking
DictionaryArray
s when comparing to scalar values. It would also be nice to reduce the amount of type dispatch in the datafusionBinaryExpr
physical expression@matthewmturner has implemented
eq_dyn_scalar
kernels (which among other things have support forDictionaryArrays
apache/arrow-rs#1113)Describe the solution you'd like
I would like the the big type dispatch in
binary_primitive_array_op_scalar
to be replaced by calls toeq_dyn_scalar
, etchttps://github.com/apache/arrow-datafusion/blob/c549d5145755e3ec07800425a56f86541d476f1f/datafusion/src/physical_plan/expressions/binary.rs#L570-L590
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: