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: bypass the arrow take for struct array #3500

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

BubbleCal
Copy link
Contributor

No description provided.

Signed-off-by: BubbleCal <bubble-cal@outlook.com>
@github-actions github-actions bot added bug Something isn't working python labels Mar 3, 2025
@BubbleCal BubbleCal requested a review from westonpace March 3, 2025 07:10
@BubbleCal BubbleCal marked this pull request as ready for review March 3, 2025 07:22
@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 45.16129% with 17 lines in your changes missing coverage. Please review.

Project coverage is 78.45%. Comparing base (33ae43b) to head (516dd19).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
rust/lance/src/dataset/take.rs 45.16% 11 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3500      +/-   ##
==========================================
- Coverage   78.48%   78.45%   -0.04%     
==========================================
  Files         252      252              
  Lines       94011    94073      +62     
  Branches    94011    94073      +62     
==========================================
+ Hits        73783    73802      +19     
- Misses      17232    17270      +38     
- Partials     2996     3001       +5     
Flag Coverage Δ
unittests 78.45% <45.16%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@westonpace westonpace left a comment

Choose a reason for hiding this comment

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

Thanks for this workaround.

Comment on lines 597 to 601
Ok(Arc::new(StructArray::new(
array.fields().clone(),
arrays,
nulls,
)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit: we could probably just return StructArray here instead of Arc<dyn Array> since the next thing you do is convert it to a RecordBatch anyways.

Signed-off-by: BubbleCal <bubble-cal@outlook.com>
@BubbleCal BubbleCal merged commit eb16635 into lancedb:main Mar 4, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants