paleolimbot commented on code in PR #378:
URL: https://github.com/apache/arrow-nanoarrow/pull/378#discussion_r1491490787
##########
python/src/nanoarrow/_lib.pyx:
##########
@@ -790,8 +1043,6 @@ cdef class CArray:
respectively.
"""
self._assert_valid()
- if requested_schema is not None:
- raise NotImplementedError("requested_schema")
Review Comment:
I'll add it back...I had thought requesting a schema was best-effort and not
cast-or-error but I just re-read the final language.
If you're a consumer passing a `requested_schema` through the protocol, it
would be a very bad idea not to check that the schema you received was the one
you requested (because if the producer got it wrong, you will crash). For
producers like this one that don't support casting, it forces that check to
happen twice (if you want to support the case where `schema` is already the
correct type). If you can do casting but only support some of the conversions
(e.g., you can return stringviews but not listviews), the current language of
the spec forces you to error.
(I know, a discussion for another place).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]