peter-toth commented on a change in pull request #24860: [SPARK-28034][SQL] 
Port with.sql
URL: https://github.com/apache/spark/pull/24860#discussion_r301078193
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/pgSQL/with.sql
 ##########
 @@ -0,0 +1,1222 @@
+--
+-- Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
+--
+--
+-- WITH
+-- 
https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/with.sql
+--
+-- This test suite contains two Cartesian products without using explicit 
CROSS JOIN syntax.
+-- Thus, we set spark.sql.crossJoin.enabled to true.
+set spark.sql.crossJoin.enabled=true;
+
+--
+-- Tests for common table expressions (WITH query, ... SELECT ...)
+--
+
+-- Basic WITH
+WITH q1(x,y) AS (SELECT 1,2)
+SELECT * FROM q1, q1 AS q2;
+
+-- Multiple uses are evaluated only once
+-- [SPARK-19799] Support recursive SQL query
+--SELECT count(*) FROM (
+--  WITH q1(x) AS (SELECT random() FROM generate_series(1, 5))
 
 Review comment:
   Ok, done.

----------------------------------------------------------------
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