mcrumiller commented on issue #538:
URL: https://github.com/apache/arrow-adbc/issues/538#issuecomment-1609618827

   Hi @lidavidm is there any update on this? I see integration tests for 
writing to the database but not reading; I'm unable to do even a simple query 
in polars via postgres (note it claims syntax error but there is none in my 
query):
   
   ```
   Traceback (most recent call last):
     File "<...>\site-packages\polars\io\database.py", line 140, in 
_read_sql_adbc
       cursor.execute(query)
     File "<...>\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: ...ore_alr_vw WHERE val_dt = '2023-05-10') TO STDOUT (FORMAT bi...
                                                                ^
   
   Query was: COPY (SELECT p
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "<...>\site-packages\polars\io\database.py", line 104, in 
read_database
       return _read_sql_adbc(query, connection_uri)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "<...>\site-packages\polars\io\database.py", line 138, in 
_read_sql_adbc
       with _open_adbc_connection(connection_uri) as conn:
     File "<...>\site-packages\adbc_driver_manager\dbapi.py", line 217, in 
__exit__
       self.close()
     File "<...>\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]

Reply via email to