jonahgao commented on code in PR #8283: URL: https://github.com/apache/arrow-datafusion/pull/8283#discussion_r1399935262
########## datafusion/sqllogictest/test_files/insert.slt: ########## @@ -350,3 +350,65 @@ insert into bad_new_empty_table values (1); statement ok drop table bad_new_empty_table; + + +### Test for specifying column's default value + +statement ok +create table test_column_defaults( + a int, + b int not null default null, Review Comment: I have tested on PostgreSQL, it does not prevent this case. ```sh psql (14.9 (Ubuntu 14.9-0ubuntu0.22.04.1)) Type "help" for help. psql=> create table t(a int, b int not null default null); CREATE TABLE ``` I guess there might be two reasons. 1. Expressions like `nullif(current_date(), '2023-11-21')` require us to check during execution, so checking here might be redundant. 2. The user may define a default value but never use it. -- 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]
