New issue
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
Columns with Null Types when converted to Arrow return an int type with nulls #7149
Comments
@cpcloud , I've chatted with @Mytherin after our meeting and confirmed that it is actually intended behavior. We could check if columns are null from the stats and output as the arrow null type. But then On the other hand, I can see an argument that arrow results are not necessarily a representation of a table schema but rather of a query result. I think, if this is something you believe it is crucial, we could enable it with an option. (e.g., output_null_type) |
@pdet Interesting! I guess it doesn't make complete sense to me why the choice of I would expect the columns a, b, c in
Isn't this true already?
I'm not sure I follow 😅! How are a table's schema and a query result's schema different things? |
What is happening is that we support D CREATE TABLE t AS SELECT NULL;
D DESCRIBE t;
┌─────────────┬─────────────┬─────────┬─────────┬─────────┬───────┐
│ column_name │ column_type │ null │ key │ default │ extra │
│ varchar │ varchar │ varchar │ varchar │ varchar │ int32 │
├─────────────┼─────────────┼─────────┼─────────┼─────────┼───────┤
│ NULL │ INTEGER │ YES │ NULL │ NULL │ NULL │
└─────────────┴─────────────┴─────────┴─────────┴─────────┴───────┘
The idea is that We could disable this behavior for the Arrow conversion, as Arrow does support the |
I see, thanks for the explanation. It's probably not worth special casing this at the moment. |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stale for 30 days with no activity. |
What happens?
Examples:
Result:
Result:
To Reproduce
See Above
OS:
Mac Os
DuckDB Version:
Master
DuckDB Client:
Python
Full Name:
Pedro
Affiliation:
DuckDB
Have you tried this on the latest
master
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
The text was updated successfully, but these errors were encountered: