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 2017/08/24 18:50:00 UTC

[GitHub] spark pull request #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

GitHub user dongjoon-hyun opened a pull request:

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

    [SPARK-21832][TEST] Merge SQLBuilderTest into ExpressionSQLBuilderSuite

    ## What changes were proposed in this pull request?
    
    After [SPARK-19025](https://github.com/apache/spark/pull/16869), there is no need to keep SQLBuilderTest.
    ExpressionSQLBuilderSuite is the only place to use it.
    This PR aims to remove SQLBuilderTest.
    
    ## How was this patch tested?
    
    Pass the updated `ExpressionSQLBuilderSuite`.

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

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

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

    https://github.com/apache/spark/pull/19044.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 #19044
    
----
commit 82a92601268e59368b763eafc30f05ca52b997ba
Author: Dongjoon Hyun <do...@apache.org>
Date:   2017-08-24T18:47:20Z

    [SPARK-21832][TEST] Merge SQLBuilderTest into ExpressionSQLBuilderSuite
    
    After SPARK-19025, there is no need to keep SQLBuilderTest.
    ExpressionSQLBuilderSuite is the only place to use it.
    This PR aims to remove SQLBuilderTest.

----


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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/19044#discussion_r135113254
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,30 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    +    } catch {
    +      case cause: Throwable =>
    +        fail(
    +          s"""Wrong SQL generated for the following expression:
    +             |
    +             |${e.prettyName}
    +             |
    +             |$cause
    +           """.stripMargin)
    +    }
    +  }
    +
    +  import org.apache.spark.sql.catalyst.dsl.expressions._
    --- End diff --
    
    Oh, I see. There is overloading issue on `===`.
    
    Line 31: `===` is string comparision.
    ```
    assert(actualSQL === expectedSQL)
    ```
    
    The `import` is used to make predicate with `===`.
    ```
    import org.apache.spark.sql.catalyst.dsl.expressions._
    ```


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    Thank you for review, @gatorsmile !


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    **[Test build #81107 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81107/testReport)** for PR 19044 at commit [`e042621`](https://github.com/apache/spark/commit/e042621003edca43501eef9e6321f2448f343cdd).
     * This patch **fails SparkR 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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    **[Test build #81101 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81101/testReport)** for PR 19044 at commit [`82a9260`](https://github.com/apache/spark/commit/82a92601268e59368b763eafc30f05ca52b997ba).


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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/19044#discussion_r135158510
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,28 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    --- End diff --
    
    The PR is updated.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    Thanks! Merging to master.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

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


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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/19044#discussion_r135157926
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,28 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    --- End diff --
    
    I see. Yep. That's better.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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/19044#discussion_r135109249
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,30 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    +    } catch {
    +      case cause: Throwable =>
    +        fail(
    +          s"""Wrong SQL generated for the following expression:
    +             |
    +             |${e.prettyName}
    +             |
    +             |$cause
    +           """.stripMargin)
    +    }
    +  }
    +
    +  import org.apache.spark.sql.catalyst.dsl.expressions._
    --- End diff --
    
    Thank you for review, @gatorsmile . I thought we can remove `SQLBuilderTest` because we will use SQL generation on expression level only.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    **[Test build #81113 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81113/testReport)** for PR 19044 at commit [`e042621`](https://github.com/apache/spark/commit/e042621003edca43501eef9e6321f2448f343cdd).
     * 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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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

    https://github.com/apache/spark/pull/19044#discussion_r135145869
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,30 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    +    } catch {
    +      case cause: Throwable =>
    +        fail(
    +          s"""Wrong SQL generated for the following expression:
    +             |
    +             |${e.prettyName}
    +             |
    +             |$cause
    +           """.stripMargin)
    +    }
    +  }
    +
    +  import org.apache.spark.sql.catalyst.dsl.expressions._
    --- End diff --
    
    Then, we should move it to the test case it needs such an import. Also add a comment there.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81106/
    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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    **[Test build #81101 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81101/testReport)** for PR 19044 at commit [`82a9260`](https://github.com/apache/spark/commit/82a92601268e59368b763eafc30f05ca52b997ba).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton `


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81107/
    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 issue #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    **[Test build #81106 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81106/testReport)** for PR 19044 at commit [`bc906c8`](https://github.com/apache/spark/commit/bc906c879787c0d55f7336c3646f20e4df2ba192).
     * 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 pull request #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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

    https://github.com/apache/spark/pull/19044#discussion_r135108214
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,30 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    +    } catch {
    +      case cause: Throwable =>
    +        fail(
    +          s"""Wrong SQL generated for the following expression:
    +             |
    +             |${e.prettyName}
    +             |
    +             |$cause
    +           """.stripMargin)
    +    }
    +  }
    +
    +  import org.apache.spark.sql.catalyst.dsl.expressions._
    --- End diff --
    
    Why moving here?


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    LGTM


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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

    https://github.com/apache/spark/pull/19044#discussion_r135112464
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,30 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    +    } catch {
    +      case cause: Throwable =>
    +        fail(
    +          s"""Wrong SQL generated for the following expression:
    +             |
    +             |${e.prettyName}
    +             |
    +             |$cause
    +           """.stripMargin)
    +    }
    +  }
    +
    +  import org.apache.spark.sql.catalyst.dsl.expressions._
    --- End diff --
    
    I mean the import.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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/19044#discussion_r135147157
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,30 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    +    } catch {
    +      case cause: Throwable =>
    +        fail(
    +          s"""Wrong SQL generated for the following expression:
    +             |
    +             |${e.prettyName}
    +             |
    +             |$cause
    +           """.stripMargin)
    +    }
    +  }
    +
    +  import org.apache.spark.sql.catalyst.dsl.expressions._
    --- End diff --
    
    Thank you. I'll update like that.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    **[Test build #81107 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81107/testReport)** for PR 19044 at commit [`e042621`](https://github.com/apache/spark/commit/e042621003edca43501eef9e6321f2448f343cdd).


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    **[Test build #81106 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81106/testReport)** for PR 19044 at commit [`bc906c8`](https://github.com/apache/spark/commit/bc906c879787c0d55f7336c3646f20e4df2ba192).


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    Retest this please.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81113/
    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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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

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


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    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 issue #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81101/
    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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Exp...

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

    https://github.com/apache/spark/pull/19044#discussion_r135157718
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala ---
    @@ -19,12 +19,28 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    --- End diff --
    
    I thought just one test case required that import. 
    
    Since most cases require it, you just need to change `===` => `==`. Then, you can move the import to the beginning of this file.


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    **[Test build #81113 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81113/testReport)** for PR 19044 at commit [`e042621`](https://github.com/apache/spark/commit/e042621003edca43501eef9e6321f2448f343cdd).


---
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 #19044: [SPARK-21832][TEST] Merge SQLBuilderTest into Expression...

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

    https://github.com/apache/spark/pull/19044
  
    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