We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
A SQL query with coalesce fails when converted to pyarrow
coalesce
To Reproduce
In [1]: import datafusion as df In [2]: ctx = df.SessionContext() In [3]: ctx.sql Out[3]: <function SessionContext.sql(query)> In [4]: ctx.sql("select coalesce(null, 5)") Out[4]: DataFrame() +-------------------------+ | coalesce(NULL,Int64(5)) | +-------------------------+ | 5 | +-------------------------+ In [5]: ctx.sql("select coalesce(null, 5)").to_arrow_table() --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) Cell In[5], line 1 ----> 1 ctx.sql("select coalesce(null, 5)").to_arrow_table() File /nix/store/nqcbgqab0slp4kx3ixk8225nwrzy5mbd-python3-3.10.13-env/lib/python3.10/site-packages/pyarrow/table.pxi:4057, in pyarrow.lib.Table.from_batches() File /nix/store/nqcbgqab0slp4kx3ixk8225nwrzy5mbd-python3-3.10.13-env/lib/python3.10/site-packages/pyarrow/error.pxi:154, in pyarrow.lib.pyarrow_internal_check_status() File /nix/store/nqcbgqab0slp4kx3ixk8225nwrzy5mbd-python3-3.10.13-env/lib/python3.10/site-packages/pyarrow/error.pxi:91, in pyarrow.lib.check_status() ArrowInvalid: Schema at index 0 was different: coalesce(NULL,Int64(5)): int64 vs coalesce(NULL,Int64(5)): int64 not null
Expected behavior
I would expect the result to be a pyarrow table with 5 in it.
5
The text was updated successfully, but these errors were encountered:
Fixed in 42.0.0. Please reopen if you continue to have problems.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
A SQL query with
coalesce
fails when converted to pyarrowTo Reproduce
Expected behavior
I would expect the result to be a pyarrow table with
5
in it.The text was updated successfully, but these errors were encountered: