You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Pajaraja (via GitHub)" <gi...@apache.org> on 2025/03/18 14:24:32 UTC

[PR] [SPARK-50838][SQL] Add Cross Join as legal in recursion of Recursive CTE [spark]

Pajaraja opened a new pull request, #50308:
URL: https://github.com/apache/spark/pull/50308

   ### What changes were proposed in this pull request?
   
   Add Cross Joins as legal in recursion in Recursive CTEs.
   
   ### Why are the changes needed?
   
   Cross join is allowed in the recursion plan of Recursive CTEs in postgreSQL.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   Will be tested in [49955](https://github.com/apache/spark/pull/49955).
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-51720][SQL] Add Cross Join as legal in recursion of Recursive CTE [spark]

Posted by "Pajaraja (via GitHub)" <gi...@apache.org>.
Pajaraja commented on PR #50308:
URL: https://github.com/apache/spark/pull/50308#issuecomment-2778680025

   > @Pajaraja How about new JIRA? Specifically for the changes.
   
   Added.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-51720][SQL] Add Cross Join as legal in recursion of Recursive CTE [spark]

Posted by "peter-toth (via GitHub)" <gi...@apache.org>.
peter-toth commented on PR #50308:
URL: https://github.com/apache/spark/pull/50308#issuecomment-2778743889

   Thanks @Pajaraja for the fix and @MaxGekk for the review!
   
   Merged to `master` (4.1.0).


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-50838][SQL] Add Cross Join as legal in recursion of Recursive CTE [spark]

Posted by "Pajaraja (via GitHub)" <gi...@apache.org>.
Pajaraja commented on PR #50308:
URL: https://github.com/apache/spark/pull/50308#issuecomment-2777981033

   > Looks good and this scenario is allowed in some engines (like postgresql), but I would suggest a more intuitive test case like:
   > 
   > ```
   > WITH RECURSIVE
   >     x(id) AS (SELECT 1 UNION SELECT 2),
   >     t(id, xid) AS (
   >         SELECT 0 AS id, 0 AS xid
   >         UNION ALL
   >         SELECT t.id + 1, xid * 10 + x.id FROM t CROSS JOIN x WHERE t.id < 3
   >     )                     
   > SELECT * FROM t
   > ```
   > 
   > ```
   > id | xid
   > -- | --
   > 0  | 0
   > 1  | 1
   > 1  | 2
   > 2  | 11
   > 2  | 12
   > 2  | 21
   > 2  | 22
   > 3  | 111
   > 3  | 112
   > 3  | 121
   > 3  | 122
   > 3  | 211
   > 3  | 212
   > 3  | 221
   > 3  | 222
   > ```
   
   Added this test too. Thanks!


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-50838][SQL] Add Cross Join as legal in recursion of Recursive CTE [spark]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #50308:
URL: https://github.com/apache/spark/pull/50308#issuecomment-2778642885

   @Pajaraja How about new JIRA? Specifically for the changes.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-51720][SQL] Add Cross Join as legal in recursion of Recursive CTE [spark]

Posted by "peter-toth (via GitHub)" <gi...@apache.org>.
peter-toth closed pull request #50308: [SPARK-51720][SQL] Add Cross Join as legal in recursion of Recursive CTE
URL: https://github.com/apache/spark/pull/50308


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org