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

feat: Add integration testing reader for Column #325

Merged
merged 19 commits into from
Nov 29, 2023

Conversation

paleolimbot
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (d37d2b0) 87.62% compared to head (e1afd57) 87.83%.
Report is 1 commits behind head on main.

Files Patch % Lines
src/nanoarrow/nanoarrow_testing.hpp 96.27% 8 Missing ⚠️
.../nanoarrow_device/src/nanoarrow/nanoarrow_device.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #325      +/-   ##
==========================================
+ Coverage   87.62%   87.83%   +0.21%     
==========================================
  Files          72       72              
  Lines       10906    11114     +208     
==========================================
+ Hits         9556     9762     +206     
- Misses       1350     1352       +2     

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

Comment on lines +662 to +663
NANOARROW_RETURN_NOT_OK(ArrowArrayViewInitFromSchema(
array_view.get(), const_cast<ArrowSchema*>(schema), error));
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps ArrowArrayViewInitFromSchema should take a const ArrowSchema*?

Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely! #215 is the issue I was planning for that one (there are a lot of places where read-only input arguments should be marked const).

src/nanoarrow/nanoarrow_testing.hpp Outdated Show resolved Hide resolved
src/nanoarrow/nanoarrow_testing.hpp Outdated Show resolved Hide resolved
src/nanoarrow/nanoarrow_testing.hpp Show resolved Hide resolved
}

// Build buffers
for (int i = 0; i < 3; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Why the hardcoded 3?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a define for this (NANOARROW_MAX_FIXED_BUFFERS). The ArrowArrayView and ArrowLayout define fixed-length arrays for buffer things and it's a pretty common pattern to loop over all three and switch on layout.buffer_type[i].

src/nanoarrow/nanoarrow_testing.hpp Outdated Show resolved Hide resolved
@@ -0,0 +1,1508 @@
// Licensed to the Apache Software Foundation (ASF) under one
Copy link
Member

Choose a reason for hiding this comment

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

Did you add this file by mistake?

@paleolimbot paleolimbot marked this pull request as ready for review November 29, 2023 18:57
@paleolimbot paleolimbot changed the title feat: Add integration testing reader for column and batch feat: Add integration testing reader for Column Nov 29, 2023
@paleolimbot paleolimbot merged commit e0329f4 into apache:main Nov 29, 2023
27 checks passed
@paleolimbot paleolimbot deleted the testing-json-read-batch branch November 29, 2023 19:38
@paleolimbot paleolimbot added this to the nanoarrow 0.4.0 milestone Jan 26, 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.

3 participants