dongjoon-hyun commented on a change in pull request #26360: 
[SPARK-29714][SQL][TESTS] Port insert.sql
URL: https://github.com/apache/spark/pull/26360#discussion_r342397024
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/insert.sql
 ##########
 @@ -0,0 +1,652 @@
+-- Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
+--
+-- INSERT
+-- 
https://github.com/postgres/postgres/blob/REL_12_STABLE/src/test/regress/sql/insert.sql
+
+--
+-- insert with DEFAULT in the target_list
+--
+-- [SPARK-19842] Informational Referential Integrity Constraints Support in 
Spark
+-- [SPARK-29119] DEFAULT option is not supported in Spark
+create table inserttest (col1 int, col2 int /* NOT NULL */, col3 string /* 
default 'testing' */) using parquet;
+-- [SPARK-29119] DEFAULT option is not supported in Spark
+-- [SPARK-20845] Support specification of column names in INSERT INTO
+-- Skip a test below because the PK constraint is violated and the query fails 
in PostgreSQL
+-- insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, 
DEFAULT);
+-- insert into inserttest (col2, col3) values (3, DEFAULT);
+insert into inserttest  values (NULL, 3, 'testing');
+-- insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT);
+insert into inserttest values (NULL, 5, 'testing');
+-- insert into inserttest values (DEFAULT, 5, 'test');
+insert into inserttest values (NULL, 5, 'test');
+-- insert into inserttest values (DEFAULT, 7);
+insert into inserttest values (NULL, 7, 'testing');
+
+select * from inserttest;
+
+--
+-- insert with similar expression / target_list values (all fail)
+--
+-- [SPARK-20845] Support specification of column names in INSERT INTO
+-- [SPARK-29119] DEFAULT option is not supported in Spark
+-- insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT);
+-- insert into inserttest (col1, col2, col3) values (1, 2);
+-- insert into inserttest (col1) values (1, 2);
+-- insert into inserttest (col1) values (DEFAULT, DEFAULT);
+
+-- select * from inserttest;
+
+--
+-- VALUES test
+--
+-- [SPARK-29119] DEFAULT option is not supported in Spark
+-- [SPARK-29715] Support SELECT statements in VALUES of INSERT INTO
+-- insert into inserttest values(10, 20, '40'), (-1, 2, 'testing' /* DEFAULT 
*/),
 
 Review comment:
   Since we are not running this, shall we keep the original?
   ```
   insert into inserttest values(10, 20, '40'), (-1, 2, DEFAULT),
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to