WillAyd opened a new issue, #1022:
URL: https://github.com/apache/arrow-adbc/issues/1022

   When querying `adbc_get_table_schema` for a table that does not exist, the 
different drivers are returning different exception types. Here is what 
postgres looks like:
   
   ```python
   >>> uri = "postgresql://postgres:postgres@localhost:5432/pandas"
   >>> with dbapi.connect(uri) as conn:
   ...         conn.adbc_get_table_schema("does_not_exist")
   
   
../../mambaforge/envs/pandas-dev/lib/python3.10/site-packages/adbc_driver_manager/dbapi.py:453:
 in adbc_get_table_schema
       handle = self._conn.get_table_schema(
   adbc_driver_manager/_lib.pyx:769: in 
adbc_driver_manager._lib.AdbcConnection.get_table_schema
       ???
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ 
   
   >   ???
   E   adbc_driver_manager._lib.OperationalError: ADBC_STATUS_IO (10): [libpq] 
Failed to execute query: ERROR:  relation "iris" does not exist
   E   CONTEXT:  unnamed portal parameter $1 = '...'
   
   adbc_driver_manager/_lib.pyx:385: OperationalError
   ```
   
   By contrast here is what sqlite throws:
   
   ```
   >>> with dbapi.connect("file:/tmp/4fd67ccb-203f-4ade-bb22-7dad59904ea9") as 
conn:
   ...         conn.adbc_get_table_schema("does_not_exist")
   
   
../../mambaforge/envs/pandas-dev/lib/python3.10/site-packages/adbc_driver_manager/dbapi.py:453:
 in adbc_get_table_schema
       handle = self._conn.get_table_schema(
   adbc_driver_manager/_lib.pyx:769: in 
adbc_driver_manager._lib.AdbcConnection.get_table_schema
       ???
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ 
   
   >   ???
   E   adbc_driver_manager._lib.InternalError: ADBC_STATUS_INTERNAL (9): 
[SQLite] Failed to prepare query: no such table: iris
   
   adbc_driver_manager/_lib.pyx:385: InternalError
   ```
   
   Would be nice to have those consistent


-- 
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