Closed
Description
Describe what's wrong
Queries with Nothing/UUID (and possibly other) types fail in 3.0.0 but were working in 2.x.
repro.py
:
from chdb import dbapi
import traceback
conn = dbapi.connect()
cursor = conn.cursor()
for query in [
"SELECT '6bbd51ac-b0cc-43a2-8cb2-eab06ff7de7b'::UUID",
"SELECT NULL",
]:
print(f"Query: {query}")
try:
cursor.execute(query)
print(f"success: {cursor.fetchone()}")
except Exception as e:
print(f"failure:\n{traceback.format_exc()}")
print()
Works fine with 2.x:
❯ uv run --python 3.12 --with chdb==2.1.1 repro.py
Query: SELECT '6bbd51ac-b0cc-43a2-8cb2-eab06ff7de7b'::UUID
success: ('6bbd51ac-b0cc-43a2-8cb2-eab06ff7de7b',)
Query: SELECT NULL
success: (None,)
Fails in 3.0.0:
uv run --python 3.12 --with chdb==3.0.0 repro.py
Query: SELECT '6bbd51ac-b0cc-43a2-8cb2-eab06ff7de7b'::UUID
failure:
Traceback (most recent call last):
File "/Users/meastham/repro/repro.py", line 12, in <module>
cursor.execute(query)
File "/Users/meastham/.cache/uv/archive-v0/z1U-_q0CjtEXfAWREwnsj/lib/python3.12/site-packages/chdb/dbapi/cursors.py", line 132, in execute
self._cursor.execute(query)
File "/Users/meastham/.cache/uv/archive-v0/z1U-_q0CjtEXfAWREwnsj/lib/python3.12/site-packages/chdb/state/sqlitelike.py", line 46, in execute
raise Exception(self._cursor.error_message())
Exception: Code: 50. DB::Exception: Code: 50. DB::Exception: The type 'UUID' of a column 'CAST('6bbd51ac-b0cc-43a2-8cb2-eab06ff7de7b', 'UUID')' is not supported for conversion into Arrow data format. (UNKNOWN_TYPE) (version 24.8.4.1). (UNKNOWN_TYPE)
Query: SELECT NULL
failure:
Traceback (most recent call last):
File "/Users/meastham/repro/repro.py", line 12, in <module>
cursor.execute(query)
File "/Users/meastham/.cache/uv/archive-v0/z1U-_q0CjtEXfAWREwnsj/lib/python3.12/site-packages/chdb/dbapi/cursors.py", line 132, in execute
self._cursor.execute(query)
File "/Users/meastham/.cache/uv/archive-v0/z1U-_q0CjtEXfAWREwnsj/lib/python3.12/site-packages/chdb/state/sqlitelike.py", line 46, in execute
raise Exception(self._cursor.error_message())
Exception: Code: 50. DB::Exception: Code: 50. DB::Exception: The type 'Nothing' of a column 'NULL' is not supported for conversion into Arrow data format. (UNKNOWN_TYPE) (version 24.8.4.1). (UNKNOWN_TYPE)
Does it reproduce on the most recent release?
Yes
Expected behavior
I expect these queries to succeed
Metadata
Metadata
Assignees
Labels
No labels