lidavidm commented on code in PR #2609:
URL: https://github.com/apache/arrow-adbc/pull/2609#discussion_r1997779144


##########
python/adbc_driver_manager/adbc_driver_manager/dbapi.py:
##########
@@ -914,12 +942,17 @@ def adbc_ingest(
             self._stmt.bind(data)
         elif hasattr(data, "__arrow_c_stream__"):
             self._stmt.bind_stream(data)
-        elif isinstance(data, pyarrow.RecordBatch):
+        elif _lib.is_pycapsule(data, b"arrow_array"):
+            self._stmt.bind(data)
+        elif _lib.is_pycapsule(data, b"arrow_array_stream"):
+            self._stmt.bind_stream(data)
+        elif _has_pyarrow and isinstance(data, pyarrow.RecordBatch):
             array = _lib.ArrowArrayHandle()
             schema = _lib.ArrowSchemaHandle()
             data._export_to_c(array.address, schema.address)
             self._stmt.bind(array, schema)

Review Comment:
   I bumped up the minimum PyArrow earlier and it seems that always supports 
this now



##########
python/adbc_driver_manager/adbc_driver_manager/dbapi.py:
##########
@@ -914,12 +942,17 @@ def adbc_ingest(
             self._stmt.bind(data)
         elif hasattr(data, "__arrow_c_stream__"):
             self._stmt.bind_stream(data)
-        elif isinstance(data, pyarrow.RecordBatch):
+        elif _lib.is_pycapsule(data, b"arrow_array"):
+            self._stmt.bind(data)
+        elif _lib.is_pycapsule(data, b"arrow_array_stream"):
+            self._stmt.bind_stream(data)
+        elif _has_pyarrow and isinstance(data, pyarrow.RecordBatch):
             array = _lib.ArrowArrayHandle()
             schema = _lib.ArrowSchemaHandle()
             data._export_to_c(array.address, schema.address)
             self._stmt.bind(array, schema)

Review Comment:
   I'll remove this



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to