You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2016/07/27 20:19:05 UTC

[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/14383

    [SPARK-15232][SQL] Add subquery SQL building tests to LogicalPlanToSQLSuite

    ## What changes were proposed in this pull request?
    
    We currently test subquery SQL building using the `HiveCompatibilitySuite`. The is not desired since SQL building is actually a part of sql/core and because we are slowly reducing our dependency on Hive. This PR adds the same tests for subquery SQL building in whitelist of `HiveCompatibilitySuite`.
    
    ## How was this patch tested?
    
    This adds more testcases. Pass the Jenkins tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-15232

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14383.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14383
    
----
commit 5b313fc054402dad7b10dd1341c5897bd23bf85b
Author: Dongjoon Hyun <do...@apache.org>
Date:   2016-07-27T20:15:53Z

    [SPARK-15232][SQL] Add subquery SQL building tests to LogicalPlanToSQLSuite

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62942/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14383#discussion_r72520449
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala ---
    @@ -934,6 +934,159 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
         }
       }
     
    +  test("mapjoin_subquery") {
    --- End diff --
    
    broadcast join


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62936/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14383#discussion_r72520430
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala ---
    @@ -934,6 +934,159 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
         }
       }
     
    +  test("mapjoin_subquery") {
    +    checkSQL(
    +      """
    +        |SELECT subq.key1, z.value
    +        |FROM (SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2
    +        |      FROM src1 x JOIN src y ON (x.key = y.key)) subq
    +        |JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
    +        |ORDER BY subq.key1, z.value
    +      """.stripMargin,
    +      "mapjoin_subquery")
    +  }
    +
    +  test("subq2") {
    --- End diff --
    
    is there a more descriptive name?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    **[Test build #62936 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62936/consoleFull)** for PR 14383 at commit [`5b313fc`](https://github.com/apache/spark/commit/5b313fc054402dad7b10dd1341c5897bd23bf85b).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Hi, @rxin and @hvanhovell .
    It's ready for review again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14383#discussion_r72521349
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala ---
    @@ -934,6 +934,159 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
         }
       }
     
    +  test("mapjoin_subquery") {
    +    checkSQL(
    +      """
    +        |SELECT subq.key1, z.value
    +        |FROM (SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2
    +        |      FROM src1 x JOIN src y ON (x.key = y.key)) subq
    +        |JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
    +        |ORDER BY subq.key1, z.value
    +      """.stripMargin,
    +      "mapjoin_subquery")
    +  }
    +
    +  test("subq2") {
    --- End diff --
    
    Sure. I actually just use the name from Hive suite for review.
    I'll review this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14383#discussion_r72521482
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala ---
    @@ -934,6 +934,159 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
         }
       }
     
    +  test("mapjoin_subquery") {
    +    checkSQL(
    +      """
    +        |SELECT subq.key1, z.value
    +        |FROM (SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2
    +        |      FROM src1 x JOIN src y ON (x.key = y.key)) subq
    +        |JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
    +        |ORDER BY subq.key1, z.value
    +      """.stripMargin,
    +      "mapjoin_subquery")
    +  }
    +
    +  test("subq2") {
    +    checkSQL(
    +      """
    +        |SELECT a.k, a.c
    +        |FROM (SELECT b.key as k, count(1) as c
    +        |      FROM src b
    +        |      GROUP BY b.key) a
    +        |WHERE a.k >= 90
    +      """.stripMargin,
    +      "subq2")
    +  }
    +
    +  test("subquery_exists") {
    +    checkSQL(
    +      """
    +        |select *
    +        |from src b
    +        |where exists (select a.key
    +        |              from src a
    +        |              where b.value = a.value and a.key = b.key and a.value > 'val_9')
    +      """.stripMargin,
    +      "subquery_exists_1")
    +
    +    checkSQL(
    +      """
    +        |select *
    +        |from (select *
    +        |      from src b
    +        |      where exists (select a.key
    +        |                    from src a
    +        |                    where b.value = a.value and a.key = b.key and a.value > 'val_9')) a
    +      """.stripMargin,
    +      "subquery_exists_2")
    +  }
    +
    +  test("subquery_exists_having") {
    +    checkSQL(
    +      """
    +        |select b.key, count(*)
    +        |from src b
    +        |group by b.key
    +        |having exists (select a.key
    +        |               from src a
    +        |               where a.key = b.key and a.value > 'val_9')
    +      """.stripMargin,
    +      "subquery_exists_having_1")
    +
    +    checkSQL(
    +      """
    +        |select *
    +        |from (select b.key, count(*)
    +        |      from src b
    +        |      group by b.key
    +        |      having exists (select a.key
    +        |                     from src a
    +        |                     where a.key = b.key and a.value > 'val_9')) a
    +      """.stripMargin,
    +      "subquery_exists_having_2")
    +
    +    checkSQL(
    +      """
    +        |select b.key, min(b.value)
    +        |from src b
    +        |group by b.key
    +        |having exists (select a.key
    +        |               from src a
    +        |               where a.value > 'val_9' and a.value = min(b.value))
    +      """.stripMargin,
    +      "subquery_exists_having_3")
    +  }
    +
    +  test("subquery_notexists") {
    --- End diff --
    
    Yep. For the naming, I will revise all according to the test context.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    **[Test build #62938 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62938/consoleFull)** for PR 14383 at commit [`7292435`](https://github.com/apache/spark/commit/7292435b66f9b80b032b5e9b66eb98ddae0cdfb7).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/14383


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    **[Test build #62941 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62941/consoleFull)** for PR 14383 at commit [`9a49580`](https://github.com/apache/spark/commit/9a49580549a3980364ed225b77a6e0342ef4d90c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62938/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    **[Test build #62941 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62941/consoleFull)** for PR 14383 at commit [`9a49580`](https://github.com/apache/spark/commit/9a49580549a3980364ed225b77a6e0342ef4d90c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14383#discussion_r72521387
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala ---
    @@ -934,6 +934,159 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
         }
       }
     
    +  test("mapjoin_subquery") {
    --- End diff --
    
    Sure!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Looks reasonable to me. Merging in master/2.0.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    **[Test build #62936 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62936/consoleFull)** for PR 14383 at commit [`5b313fc`](https://github.com/apache/spark/commit/5b313fc054402dad7b10dd1341c5897bd23bf85b).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    **[Test build #62942 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62942/consoleFull)** for PR 14383 at commit [`d7d70e6`](https://github.com/apache/spark/commit/d7d70e67dbeaa456d8e0c308f0ddc13a9963b0cf).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    **[Test build #62942 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62942/consoleFull)** for PR 14383 at commit [`d7d70e6`](https://github.com/apache/spark/commit/d7d70e67dbeaa456d8e0c308f0ddc13a9963b0cf).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Thank you for review and merging, @rxin .


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14383#discussion_r72520548
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala ---
    @@ -934,6 +934,159 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
         }
       }
     
    +  test("mapjoin_subquery") {
    +    checkSQL(
    +      """
    +        |SELECT subq.key1, z.value
    +        |FROM (SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2
    +        |      FROM src1 x JOIN src y ON (x.key = y.key)) subq
    +        |JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
    +        |ORDER BY subq.key1, z.value
    +      """.stripMargin,
    +      "mapjoin_subquery")
    +  }
    +
    +  test("subq2") {
    +    checkSQL(
    +      """
    +        |SELECT a.k, a.c
    +        |FROM (SELECT b.key as k, count(1) as c
    +        |      FROM src b
    +        |      GROUP BY b.key) a
    +        |WHERE a.k >= 90
    +      """.stripMargin,
    +      "subq2")
    +  }
    +
    +  test("subquery_exists") {
    +    checkSQL(
    +      """
    +        |select *
    +        |from src b
    +        |where exists (select a.key
    +        |              from src a
    +        |              where b.value = a.value and a.key = b.key and a.value > 'val_9')
    +      """.stripMargin,
    +      "subquery_exists_1")
    +
    +    checkSQL(
    +      """
    +        |select *
    +        |from (select *
    +        |      from src b
    +        |      where exists (select a.key
    +        |                    from src a
    +        |                    where b.value = a.value and a.key = b.key and a.value > 'val_9')) a
    +      """.stripMargin,
    +      "subquery_exists_2")
    +  }
    +
    +  test("subquery_exists_having") {
    +    checkSQL(
    +      """
    +        |select b.key, count(*)
    +        |from src b
    +        |group by b.key
    +        |having exists (select a.key
    +        |               from src a
    +        |               where a.key = b.key and a.value > 'val_9')
    +      """.stripMargin,
    +      "subquery_exists_having_1")
    +
    +    checkSQL(
    +      """
    +        |select *
    +        |from (select b.key, count(*)
    +        |      from src b
    +        |      group by b.key
    +        |      having exists (select a.key
    +        |                     from src a
    +        |                     where a.key = b.key and a.value > 'val_9')) a
    +      """.stripMargin,
    +      "subquery_exists_having_2")
    +
    +    checkSQL(
    +      """
    +        |select b.key, min(b.value)
    +        |from src b
    +        |group by b.key
    +        |having exists (select a.key
    +        |               from src a
    +        |               where a.value > 'val_9' and a.value = min(b.value))
    +      """.stripMargin,
    +      "subquery_exists_having_3")
    +  }
    +
    +  test("subquery_notexists") {
    --- End diff --
    
    subquery_not_exists


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    **[Test build #62938 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62938/consoleFull)** for PR 14383 at commit [`7292435`](https://github.com/apache/spark/commit/7292435b66f9b80b032b5e9b66eb98ddae0cdfb7).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62941/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14383: [SPARK-15232][SQL] Add subquery SQL building test...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14383#discussion_r72520586
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala ---
    @@ -934,6 +934,159 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
         }
       }
     
    +  test("mapjoin_subquery") {
    +    checkSQL(
    +      """
    +        |SELECT subq.key1, z.value
    +        |FROM (SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2
    +        |      FROM src1 x JOIN src y ON (x.key = y.key)) subq
    +        |JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
    +        |ORDER BY subq.key1, z.value
    +      """.stripMargin,
    +      "mapjoin_subquery")
    +  }
    +
    +  test("subq2") {
    +    checkSQL(
    +      """
    +        |SELECT a.k, a.c
    +        |FROM (SELECT b.key as k, count(1) as c
    +        |      FROM src b
    +        |      GROUP BY b.key) a
    +        |WHERE a.k >= 90
    +      """.stripMargin,
    +      "subq2")
    +  }
    +
    +  test("subquery_exists") {
    +    checkSQL(
    +      """
    +        |select *
    +        |from src b
    +        |where exists (select a.key
    +        |              from src a
    +        |              where b.value = a.value and a.key = b.key and a.value > 'val_9')
    +      """.stripMargin,
    +      "subquery_exists_1")
    +
    +    checkSQL(
    +      """
    +        |select *
    +        |from (select *
    +        |      from src b
    +        |      where exists (select a.key
    +        |                    from src a
    +        |                    where b.value = a.value and a.key = b.key and a.value > 'val_9')) a
    +      """.stripMargin,
    +      "subquery_exists_2")
    +  }
    +
    +  test("subquery_exists_having") {
    +    checkSQL(
    +      """
    +        |select b.key, count(*)
    +        |from src b
    +        |group by b.key
    +        |having exists (select a.key
    +        |               from src a
    +        |               where a.key = b.key and a.value > 'val_9')
    +      """.stripMargin,
    +      "subquery_exists_having_1")
    +
    +    checkSQL(
    +      """
    +        |select *
    +        |from (select b.key, count(*)
    +        |      from src b
    +        |      group by b.key
    +        |      having exists (select a.key
    +        |                     from src a
    +        |                     where a.key = b.key and a.value > 'val_9')) a
    +      """.stripMargin,
    +      "subquery_exists_having_2")
    +
    +    checkSQL(
    +      """
    +        |select b.key, min(b.value)
    +        |from src b
    +        |group by b.key
    +        |having exists (select a.key
    +        |               from src a
    +        |               where a.value > 'val_9' and a.value = min(b.value))
    +      """.stripMargin,
    +      "subquery_exists_having_3")
    +  }
    +
    +  test("subquery_notexists") {
    --- End diff --
    
    same thing for the following few tests.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14383: [SPARK-15232][SQL] Add subquery SQL building tests to Lo...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/14383
  
    cc @hvanhovell and @rxin 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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