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

   ### What happened?
   
   It seems such a simple use case that I think I'm doing something wrong, but 
I can't find what..
   
   Just a simple insert with at least one of the parameter passed as None.
   
   ### Stack Trace
   
   ```
   Traceback (most recent call last):
     File "source.py", line 36, in <module>
       cur.execute('insert into t values ($1, $2)', ('hello', None))
     File "\Lib\site-packages\adbc_driver_manager\dbapi.py", line 751, in 
execute
       handle, self._rowcount = _blocking_call(
                                ^^^^^^^^^^^^^^^
     File "adbc_driver_manager/_lib.pyx", line 1770, in 
adbc_driver_manager._lib._blocking_call
       return func(*args, **kwargs)
     File "adbc_driver_manager/_lib.pyx", line 1364, in 
adbc_driver_manager._lib.AdbcStatement.execute_query
       check_error(status, &c_error)
     File "adbc_driver_manager/_lib.pyx", line 261, in 
adbc_driver_manager._lib.check_error
       raise convert_error(status, error)
   adbc_driver_manager.InternalError: INTERNAL: nanoarrow call failed: 
PostgresType::FromSchema(type_resolver, bind_schema->children[i], &type, 
&na_error) = (129) not supported. Can't map Arrow type 'na' to Postgres type
   ````
   
   ### How can we reproduce the bug?
   
   ```py
   from adbc_driver_postgresql.dbapi import connect
   
   url = 'postgresql://scott:tiger@localhost/test' 
   with connect(url) as conn, conn.cursor() as cur:
       cur.execute("drop table if exists t")
       cur.execute("create table t(a text, b int)")
       conn.commit()
   # setting StatementOptions.USE_COPY to false makes no difference
   with connect(url) as conn, conn.cursor() as cur:
       cur.execute("insert into t values ($1, $2)", ("hello", None))
   ```
   
   ### Environment/Setup
   
   adbc_driver_manager = 1.8.0
   adbc_driver_postgresql = 1.8.0
   python 3.12 x64 on windows


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