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 for compare #1570

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

implement for compare #1570

wants to merge 2 commits into from

Conversation

doki23
Copy link
Contributor

@doki23 doki23 commented Dec 5, 2024

Close #1420

@doki23 doki23 marked this pull request as ready for review December 5, 2024 15:36
) -> VortexResult<Option<ArrayData>> {
// this is cheap
let owned_lhs = lhs.clone();
let decompressed_lhs = decompress(owned_lhs)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So by default, the compare function will fall back to canonicalizing an array into the Arrow representation and then running the compare kernel over it.

So we should only implement a compute function for an encoding when it is able to short-cut some work.

In the case of FoR, if the RHS is constant rhs.as_constant(), then you could subtract the lhs.reference() value and then push-down the comparison without decompressing.

For FoR, this doesn't itself make the compare any cheaper, but it does allow FoR's child to possible implement a cheaper comparison.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get it, thanks

@doki23 doki23 marked this pull request as draft December 6, 2024 05:00
@gatesn gatesn mentioned this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement FoR::compare
2 participants