jorisvandenbossche commented on code in PR #1346:
URL: https://github.com/apache/arrow-adbc/pull/1346#discussion_r1423115292


##########
python/adbc_driver_manager/adbc_driver_manager/_lib.pyx:
##########
@@ -1006,26 +1088,31 @@ cdef class AdbcStatement(_AdbcHandle):
 
         Parameters
         ----------
-        data : int or ArrowArrayHandle
-        schema : int or ArrowSchemaHandle
+        data : PyCapsule or int or ArrowArrayHandle
+        schema : PyCapsule or int or ArrowSchemaHandle
         """
         cdef CAdbcError c_error = empty_error()
         cdef CArrowArray* c_array
         cdef CArrowSchema* c_schema
 
-        if isinstance(data, ArrowArrayHandle):
+        if PyCapsule_CheckExact(data):

Review Comment:
   I first started doing that, but then decided to (for now) handle that on the 
DBAPI level, and here only deal with the actual pointers (whether wrapped in 
capsule, handle or as raw integer). 
   
   It's easy to add, but then it makes the API a bit less consistent, because 
then `schema` would need to be made an optional argument, as that is embodied 
in the object with the dunder.
   
   But given that the lower-level API exposes the dunders in the returned 
handles, it maybe also makes sense to let it ingest object with the dunders 
directly as well



-- 
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]

Reply via email to