CaselIT opened a new issue, #3543:
URL: https://github.com/apache/arrow-adbc/issues/3543
### What happened?
If I access `cursor.description` before calling fetch_arrow or fetch_polars
an exception is raised:
> ProgrammingError: Result set has been closed or consumed
Using `fetch_arrow_table` or `fetch_df` works instead
### Stack Trace
```
Traceback (most recent call last):
File "source,py", line 77, in <module>
print(cur.fetch_polars())
^^^^^^^^^^^^^^^^^^
File "Lib\site-packages\adbc_driver_manager\dbapi.py", line 1211, in
fetch_polars
return self._results.fetch_polars()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Lib\site-packages\adbc_driver_manager\dbapi.py", line 1354, in
fetch_polars
return _blocking_call(
^^^^^^^^^^^^^^^
File "adbc_driver_manager/_lib.pyx", line 1770, in
adbc_driver_manager._lib._blocking_call
return func(*args, **kwargs)
File "Lib\site-packages\adbc_driver_manager\dbapi.py", line 1357, in
<lambda>
polars.from_arrow(self.fetch_arrow()),
^^^^^^^^^^^^^^^^^^
File "Lib\site-packages\adbc_driver_manager\dbapi.py", line 1366, in
fetch_arrow
raise ProgrammingError(
adbc_driver_manager.ProgrammingError: Result set has been closed or consumed
```
### How can we reproduce the bug?
# any driver will do the same, example postgres
```py
from adbc_driver_postgresql.dbapi import connect
url = 'postgresql://scott:tiger@localhost/test'
c = connect(url)
with c:
with c.cursor() as cur:
cur.execute('select 42 as col')
print(cur.description) # commenting this like makes it work
print(cur.fetch_polars())
```
### Environment/Setup
adbc_driver_manager = 1.8.0
adbc_driver_postgresql = 1.8.0
--
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]