-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Useeq_dyn
, neq_dyn
, lt_dyn
, lt_eq_dyn
, gt_dyn
, gt_eq_dyn
kernels from arrow
#1475
Conversation
@liukun4515 I am hopefuly that eventually the |
The #1483 is ready for merged, now I am developing the kernel for decimal operation in the arrow-rs. I think it will ready in the next release of arrow-rs. |
27d7888
to
55b2ebf
Compare
Rebased on top of #1523 (aka upgrade to arrow 7.0.0) which includes apache/arrow-rs#1095 from @viirya ❤️ and this PR is in much better shape. |
55b2ebf
to
dab8b26
Compare
dab8b26
to
dca382f
Compare
This PR is failing because eq_dyn kernels don't have support for Decimal. I will add that |
Filed apache/arrow-rs#1200 to track adding support for decimal arrays |
Switching back to draft until the underlying arrow kernel support is done |
cc @matthewmturner @viirya and @liukun4515 I think this is now ready for review |
@@ -91,8 +131,10 @@ fn is_not_distinct_from_bool( | |||
.collect()) | |||
} | |||
|
|||
// TODO add iter for decimal array | |||
// TODO move this to arrow-rs | |||
// TODO move decimal kernels to to arrow-rs |
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.
Maybe I can take this, and migrate decimal to arrow-rs kernel recently
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.
LGTM
@alamb codebase is becoming more cleaner.
Thanks -- I am trying @liukun4515 . What I really hope to do with these kernels is get to a point where we can add more specialized implementations in arrow-rs and have them flow automatically to DataFusion. A particular interest of ours in IOx is performance of dictionary encoded data -- so after this PR is merged, the work that @viirya is doing in PRs like apache/arrow-rs#1326 will end up automatically being available in DataFusion) |
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.
lgtm
Operator::Lt => lt_dyn(&left, &right), | ||
Operator::LtEq => lt_eq_dyn(&left, &right), | ||
Operator::Gt => gt_dyn(&left, &right), | ||
Operator::GtEq => gt_eq_dyn(&left, &right), | ||
Operator::Eq => eq_dyn(&left, &right), | ||
Operator::NotEq => neq_dyn(&left, &right), |
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.
👍
Which issue does this PR close?
Marking as draft because the PR fails as the Arrow kernels don't handle timestamps and dates, which DataFusion does. I will make a PR to fix arrow shortlyre #1474 -- and towards #87
Rationale for this change
@jimexist added dyn kernels in apache/arrow-rs#858 but we still have the dispatch logic in datafusion, which is redundant (and as we add more logic to arrow-rs we will need to change datafusion to take advantage of it)
@matthewmturner is working on a similar set of kernels for scalars in apache/arrow-rs#1074
In this way, we will have a single set of kernels that datafusion can call and we will extend them as needed
What changes are included in this PR?
Use different arrow kernels
Are there any user-facing changes?
No
Corresponding arrow PR: apache/arrow-rs#1086