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

Introduce Compare to support nulls comparison #5672

Closed
wants to merge 6 commits into from

Conversation

jayzhan211
Copy link
Contributor

Which issue does this PR close?

First step of #5426, support existing comparator, exclude list

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

Signed-off-by: jayzhan211 <[email protected]>
Signed-off-by: jayzhan211 <[email protected]>
Signed-off-by: jayzhan211 <[email protected]>
Signed-off-by: jayzhan211 <[email protected]>
@github-actions github-actions bot added the arrow Changes to the arrow crate label Apr 21, 2024
}

#[inline]
pub fn is_null(&self) -> bool {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: not used

@tustvold
Copy link
Contributor

tustvold commented Apr 21, 2024

As stated on the ticket, this needs more thought as it won't work for distinct, it is on my list to work out a way to support this but I haven't had time recently.

Edit: it is possible I just had a brain fart, I think we should mock up something showing this works for distinct and then we can move forward with this. We should probably double check this doesn't regress the lexsort benchmarks as well

@jayzhan211 jayzhan211 marked this pull request as draft April 21, 2024 11:35
/// Compare the values at two arbitrary indices in two arrays.
pub type DynComparator = Box<dyn Fn(usize, usize) -> Ordering + Send + Sync>;
pub type DynComparator = Box<dyn Fn(usize, usize) -> Compare + Send + Sync>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently this will be a breaking change, we might want to make this change additive and deprecate DynComparator instead

@@ -725,16 +726,19 @@ impl LexicographicalComparator {
None => (true, true),
};

// TODO: after dict values with nulls are supported, we can compare with
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will probably be necessary to avoid this change regressing the performance of lexsort

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants