metesynnada commented on PR #5520: URL: https://github.com/apache/arrow-datafusion/pull/5520#issuecomment-1465991022
I made changes to the code based on the feedback received. While testing the code, I discovered a problem with how a table was being created using a DDL query. The issue was that the table was made with non-nullable columns by default, which contradicts PostgreSQL 15. ```sql CREATE TABLE table_without_values(field1 BIGINT, field2 BIGINT); ``` DDL query. It defaults to non-nullable columns while creating a table, which is not the case in [PostgreSQL 15](https://www.postgresql.org/docs/current/sql-createtable.html). > NULL > The column is allowed to contain null values. This is the default. > This clause is only provided for compatibility with non-standard SQL databases. Its use is discouraged in new applications. To fix this issue, I changed the DDL queries to explicitly specify that the columns can contain null values, like this: `CREATE TABLE table_without_values(field1 BIGINT NULL, field2 BIGINT NULL);`. This was necessary because when using the `AS VALUES ...` statement to insert data into the table, it created a plan that assumed the schema was nullable, which is not compatible with a schema that has non-nullable fields. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
