WillAyd opened a new issue, #1076:
URL: https://github.com/apache/arrow-adbc/issues/1076
executemany is supposed to accept a sequence of parameters, but it looks
like the implementation here adds an extra requirement that the argument be
subscriptable.
```python
def executemany(self, operation: Union[bytes, str], seq_of_parameters) ->
None:
"""
Execute a query with multiple parameter sets.
This method does not generate a result set.
Parameters
----------
operation : bytes or str
The query to execute. Pass SQL queries as strings,
(serialized) Substrait plans as bytes.
parameters
Parameters to bind. Can be a list of Python sequences, or
an Arrow record batch, table, or record batch reader. If
None, then the query will be executed once, else it will
be executed once per row.
"""
self._results = None
if operation != self._last_query:
self._last_query = operation
self._stmt.set_sql_query(operation)
self._stmt.prepare()
if isinstance(
seq_of_parameters,
(pyarrow.RecordBatch, pyarrow.Table, pyarrow.RecordBatchReader),
):
arrow_parameters = seq_of_parameters
elif seq_of_parameters:
arrow_parameters = pyarrow.record_batch(
[
pyarrow.array([row[col_idx] for row in
seq_of_parameters])
> for col_idx in range(len(seq_of_parameters[0]))
],
names=[str(i) for i in range(len(seq_of_parameters[0]))],
)
E TypeError: '_csv.reader' object is not subscriptable
../../mambaforge/envs/pandas-dev/lib/python3.10/site-packages/adbc_driver_manager/dbapi.py:659:
TypeError
```
--
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]