-
Notifications
You must be signed in to change notification settings - Fork 1.5k
CREATE TABLE defaults to NON nullable (should be nullable to follow postgres) #5575
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
Comments
I think this is a good first issue as the desired behavior is well understood and the code location is identified |
I tried to test |
Currently on CTAS supported
I think we also support traditional create table. Moreover we already have methods to create database. |
Integrating its support into the planner is straightforward. Simply changing the input of |
Uh oh!
There was an error while loading. Please reload this page.
CREATE TABLE
statements create tables with non-nullable columns by default, which contradicts PostgreSQL 15.DDL query. It defaults to non-nullable columns while creating a table, which is not the case in PostgreSQL 15.
PS: The code piece that results non-nullable default:
https://github.com/apache/arrow-datafusion/blob/1a22f9fd436c9892566b668e535e0d6c8cb9fbd3/datafusion/sql/src/planner.rs#L127-L144
Originally posted by @metesynnada in #5520 (comment)
Desired behavior:
Make the default columns NULLABLE
this should work (and insert a single null value into
foo
)The text was updated successfully, but these errors were encountered: