Skip to content

Conversation

@gbloisi
Copy link
Contributor

@gbloisi gbloisi commented Nov 3, 2018

Because of SPARK-17590 support of WITH clause (CTE) in subqueries requires only grammar support.

Test for augmented syntax is provided.

@gbloisi gbloisi changed the title Support WITH clause (CTE) in subqueries [SPARK-19799] Support WITH clause (CTE) in subqueries Nov 3, 2018
@gatorsmile
Copy link
Member

ok to test

@SparkQA
Copy link

SparkQA commented Nov 4, 2018

Test build #98453 has finished for PR 22936 at commit 66cd537.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

FIX:
Scalastyle checks failed at following occurrences:
[error] /home/jenkins/workspace/SparkPullRequestBuilder/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala:545: File line length exceeds 100 characters
@SparkQA
Copy link

SparkQA commented Nov 7, 2018

Test build #98568 has finished for PR 22936 at commit 5377087.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

FIX: [error] /home/jenkins/workspace/SparkPullRequestBuilder/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala:545:79: Whitespace at end of line
@SparkQA
Copy link

SparkQA commented Nov 7, 2018

Test build #98569 has finished for PR 22936 at commit 3080ed4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Row(5, "5") :: Row(4, "4") :: Nil)
}

test("SPARK-19799: Support WITH clause in subqueries") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add more test cases? For example, can a with clause in a subquery shadow a with clause in an enclosing query with the same name? Another example, use with clauses in a subquery expression?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to find some spare time for that, but I'll surely do sooner or later. I assumed that most of the correctness comes from #15146 but surely there may be interactions that goes beyond that.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@maropu
Copy link
Member

maropu commented Feb 4, 2019

@gbloisi Any update?

@gatorsmile
Copy link
Member

@chrysanxia Could you take over this?

@peter-toth
Copy link
Contributor

@gatorsmile @gbloisi @chrysanxia may I take over this?
I played a bit with recursion support recently:
#23531 and during porting https://github.com/postgres/postgres/blob/master/src/test/regress/sql/with.sql I also found that WITH is not supported in subqueries #23531 (comment) (point 6).

@peter-toth
Copy link
Contributor

@gatorsmile here is my PR: #24831

@maropu maropu closed this Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants