You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here, batch is tuples of the python standard lib uuid.UUID from the psyopg2 cursor. Then, the pa.array(<uuid.UUIDs> type=pa.string) call fails.
I see a few possible paths here:
do the conversion on the backend side, before fetching results. Then the psyopg2 cursor returns actual strings. We already have the ibis->pyarrow type mappings, we could then roundtrip the other way first, eg expr.cast(type.to_arrow().to_ibis()) Probably the easiest, but might lead to the wrong types sometimes if some info is lost during this roundtrip?
do the conversion after fetching from the cursor. maybe hardcode the few datatypes that are problems?
submit a patch to upstream pyarrow to accept uuid.UUID types
What version of ibis are you using?
main
What backend(s) are you using, if any?
postgres
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
What happened?
See the xfailing test in #8901
in ibis/formats/pyarrow.py, we say that ibis.UUID should map to pa.string. This makes sense, there is no builting UUID in pyarrow.
but then in SQLBackend.to_pyarrow_batches(), we do
here,
batch
is tuples of the python standard libuuid.UUID
from the psyopg2 cursor. Then, thepa.array(<uuid.UUIDs> type=pa.string)
call fails.I see a few possible paths here:
expr.cast(type.to_arrow().to_ibis())
Probably the easiest, but might lead to the wrong types sometimes if some info is lost during this roundtrip?What version of ibis are you using?
main
What backend(s) are you using, if any?
postgres
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: