-
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
Minor: reduce replication for nested comparison #11149
Conversation
let values = (0..len).map(|i| cmp(i, i).is_eq()).collect(); | ||
let nulls = NullBuffer::union(left.nulls(), right.nulls()); | ||
return Ok(BooleanArray::new(values, nulls)); | ||
return Ok(compare_op_for_nested(&Operator::Eq, &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.
the point of the PR is to use the pre-existing function that already handles this
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.
I think we can use apply_cmp_for_nested
and keep compare_op_for_nested
private here.
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.
The reason I used compare_op_for_nested
was that apply_cmp_for_nested
returns a ColumnarValue
and this function has to &dyn Array
s
Thank you @rtyler and @jayzhan211 for the reviews |
Which issue does this PR close?
Follow on to #11117
Rationale for this change
@jayzhan211 had a suggestion on how to simplify the implementation in #11117 (comment) from @rtyler .
What changes are included in this PR?
Use a pre-existing function to compare structured types
Are these changes tested?
Covered by existing tests (added in #11117)
Are there any user-facing changes?