mcrumiller commented on issue #538:
URL: https://github.com/apache/arrow-adbc/issues/538#issuecomment-1609946572
What's your system? I'm running on Windows w/ Greenplum postgres, which I
think may be the issue here. I set up the exact same table as you with the
exact same query and I still get the error:
```python
uri = f"postgresql://{username}:{password}@{server}:5432/{database}"
squery = "SELECT string_field FROM my_table WHERE date_field = '2023-05-10'"
pl.read_database(query, connection_uri=uri, engine="adbc")
```
```
Traceback (most recent call last):
File
"C:\Projects\project-brr\.venv_brr\Lib\site-packages\polars\io\database.py",
line 140, in _read_sql_adbc
cursor.execute(query)
File
"C:\Projects\project-brr\.venv_brr\Lib\site-packages\adbc_driver_manager\dbapi.py",
line 604, in execute
handle, self._rowcount = self._stmt.execute_query()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "adbc_driver_manager\_lib.pyx", line 991, in
adbc_driver_manager._lib.AdbcStatement.execute_query
File "adbc_driver_manager\_lib.pyx", line 385, in
adbc_driver_manager._lib.check_error
adbc_driver_manager._lib.OperationalError: ADBC_STATUS_IO (10): [libpq]
Failed to execute query: could not begin COPY: ERROR: syntax error at or near
"("
LINE 1: ..._table WHERE date_field = '2023-05-10') TO STDOUT (FORMAT bi...
^
Query was: COPY (SELECT s
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"C:\Projects\project-brr\.venv_brr\Lib\site-packages\polars\io\database.py",
line 104, in read_database
return _read_sql_adbc(query, connection_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"C:\Projects\project-brr\.venv_brr\Lib\site-packages\polars\io\database.py",
line 138, in _read_sql_adbc
with _open_adbc_connection(connection_uri) as conn:
File
"C:\Projects\project-brr\.venv_brr\Lib\site-packages\adbc_driver_manager\dbapi.py",
line 217, in __exit__
self.close()
File
"C:\Projects\project-brr\.venv_brr\Lib\site-packages\adbc_driver_manager\dbapi.py",
line 302, in close
self._conn.close()
File "adbc_driver_manager\_lib.pyx", line 855, in
adbc_driver_manager._lib.AdbcConnection.close
File "adbc_driver_manager\_lib.pyx", line 456, in
adbc_driver_manager._lib._AdbcHandle._check_open_children
File "adbc_driver_manager\_lib.pyx", line 458, in
adbc_driver_manager._lib._AdbcHandle._check_open_children
RuntimeError: Cannot close AdbcConnection with open AdbcStatement
```
--
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]