You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/06/15 01:20:56 UTC

[GitHub] [arrow-nanoarrow] paleolimbot commented on pull request #117: feat(python): Python schema, array, and array view skeleton

paleolimbot commented on PR #117:
URL: https://github.com/apache/arrow-nanoarrow/pull/117#issuecomment-1592191344

   > I am not sure what the benefit is of the splits between the base class and the View class (eg Array and ArrayView).
   
   I'm happy to workshop this more in subsequent PRs...it's a tiny bit unfortunate that there a number of overlapping names; the `Array`, `Schema`, and `ArrayStream` in nanoarrow are 1:1 aligned with the C data interface names (in the C library and in the R package, too). The `Schema` and `Array` in particular are poor analogues for the function of schemas and arrays elsewhere (notably the pyarrow or Arrow C++ concept of an Array). Here, it's "just" the thinnest possible wrapper around an `ArrowArray*`. The nanoarrow C library's `ArrowArrayView` functions more like an `Array`, as does the `ArrayView` here.
   
   Notably, the `ArrayView` doesn't care where its buffer contents came from. The most logical way to populate its buffers is from an `Array` but you could also do it from serialized IPC (via tha IPC extension) or Python buffers or whatever. You can also modify the `offset` and `length` since it's not pointing to any particular `ArrowArray` that might be pointed to from elsewhere. Earlier versions of nanoarrow and of this PR didn't make that distinction evident and I've tried to do that here (e.g., by dropping every reference from the ArrayView class into the Array class).
   
   There was also a note about using the `src/` directory...I really did try to make it work with code coverage. The Cython coverage plugin is very finicky but given that most of this package is currently implemented in Cython, I think it's an important development tool to keep until I can figure out the proper `pytest --cov` invocation with the `src/` directory version (or maybe somebody else can figure it out more quickly than I can).
   
   There are definitely unfinished points here, but I do want to merge this because it (and its limited test suite) get a lot of the boilerplate out of the way so that the discussion can focus on more substantial topics when it does arise.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org