Skip to content
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

Implement DecimalArray support in eq_dyn, neq_dyn, lt_dyn, lt_eq_dyn, gt_dyn, gt_eq_dyn #1200

Closed
alamb opened this issue Jan 18, 2022 · 8 comments
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented Jan 18, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Rationale make it as easier (more ergonomic) to implement array comparison, both for DataFusion and other users. See rationale in #843

Describe the solution you'd like
The idea would basically be to implement the same thing as @viirya did for timestamp types in #1095 but for DecimalArrays

That is the following code should not assert and compare the decimal arrays element by element:

let arr1: DecimalArray = ...;
let arr2: DecimalArray = ...;
let result = eq_dyn(&arr1, &arr2);
assert!(result.is_ok())

Describe alternatives you've considered
For completeness, we could also add eq_decimal, neq_decimal, etc as well, though I personally think focusing on the dyn kernels would be the easiest thing.

Additional context

@liukun4515 has added kernels in DataFusion here which could be adapted
https://github.com/apache/arrow-datafusion/blob/master/datafusion/src/physical_plan/expressions/binary.rs#L80-L231

other context:
I am trying to move datafusion over to using the dyn kernels here: apache/datafusion#1475

@alamb alamb added good first issue Good for newcomers arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog labels Jan 18, 2022
@liukun4515
Copy link
Contributor

liukun4515 commented Jan 19, 2022

@alamb Do you begin to do this?
If not, I can try it.

@alamb
Copy link
Contributor Author

alamb commented Jan 19, 2022

@liukun4515 I have not started this

@viirya
Copy link
Member

viirya commented May 10, 2022

Any more progress? If no, I may find some time working on this.

@alamb
Copy link
Contributor Author

alamb commented May 10, 2022

I have not made any progress on this sadly

@liukun4515
Copy link
Contributor

Any more progress? If no, I may find some time working on this.

I will do this when the kernel functions are ready in the datafusion side.
@viirya

@alamb
Copy link
Contributor Author

alamb commented May 30, 2022

@liukun4515
Copy link
Contributor

I think it has been done.
cc @alamb @tustvold

@liukun4515
Copy link
Contributor

we can close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants