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

Fix some issues with arrow expression eval #401

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

scovich
Copy link
Collaborator

@scovich scovich commented Oct 16, 2024

Three things:

  1. The nested column extraction code was overly complex. Simplified.
  2. The in-list extraction code was doing redundant nested column extraction. Clean it up.
  3. One of the in-list unit tests was claiming to verify IN but actually executed NOT IN. Fix it.

@scovich scovich requested review from nicklan and hntd187 October 16, 2024 03:32
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.25%. Comparing base (025aba8) to head (06be812).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
kernel/src/engine/arrow_expression.rs 84.61% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #401      +/-   ##
==========================================
- Coverage   78.34%   78.25%   -0.09%     
==========================================
  Files          49       49              
  Lines       10282    10256      -26     
  Branches    10282    10256      -26     
==========================================
- Hits         8055     8026      -29     
- Misses       1775     1780       +5     
+ Partials      452      450       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

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

LGTM just a couple nits for comment/follow-up

} else {
// Last path step. Return it.
Ok(child)
fn extract_column<'a>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe a super quick example would also be useful? e.g. parent is complex struct column a and field names are [b, c] means we return a ref to the nested column c? am I understanding correctly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Exactly. Added the missing doc comment.

.cloned()
}
}
(Column(name), _) => extract_column(batch, name.split('.')),
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we still need to have a follow-up in order to properly handle nested columns (instead of just naive split('.')?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Definitely. My WIP nested column code already handles it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, you refer to the deleted TODO comment. Reinstating it.

@scovich scovich merged commit edc85e5 into delta-io:main Oct 17, 2024
13 of 14 checks passed
@scovich scovich deleted the arrow-eval-fix branch November 8, 2024 21:00
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.

3 participants