You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wangyum <gi...@git.apache.org> on 2017/08/03 08:52:38 UTC

[GitHub] spark pull request #18833: [SPARK-21625][SQL] sqrt(negative number) should b...

GitHub user wangyum opened a pull request:

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

    [SPARK-21625][SQL] sqrt(negative number) should be null.

    ## What changes were proposed in this pull request?
    
    This PR makes `sqrt(negative number)` to null, same as Hive and MySQL.
    
    ## How was this patch tested?
    
    unit tests

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

    $ git pull https://github.com/wangyum/spark SPARK-21625

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

    https://github.com/apache/spark/pull/18833.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 #18833
    
----
commit f346f5b240f20b653d4a2c6eaf11660f7f7ff98b
Author: Yuming Wang <wg...@gmail.com>
Date:   2017-08-03T08:43:52Z

    sqrt function deal with negative number.

----


---
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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

    https://github.com/apache/spark/pull/18833
  
    **[Test build #83203 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/83203/testReport)** for PR 18833 at commit [`cbbfa5e`](https://github.com/apache/spark/commit/cbbfa5edf8d9edf1d25fb1c456725cac73418602).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, \"SQRT\")`


---

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


[GitHub] spark issue #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

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


---

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


[GitHub] spark pull request #18833: [SPARK-21625][SQL] sqrt(negative number) should b...

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

    https://github.com/apache/spark/pull/18833#discussion_r131566961
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala ---
    @@ -403,11 +403,13 @@ class MathExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
     
       test("sqrt") {
         testUnary(Sqrt, math.sqrt, (0 to 20).map(_ * 0.1))
    -    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNaN = true)
    +    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNull = true)
    --- End diff --
    
    Users always use `is not null` filter invalid value, but spark sql breaks:
    ```
             > create table spark_21625 as select 10 as c1, sqrt(-10) as c2;
    spark-sql> select * from spark_21625;
    10      NaN                                                                     
    spark-sql> select * from spark_21625 where c2 is not null;
    10	NaN
    ```


---
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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

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


---

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


[GitHub] spark issue #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

    https://github.com/apache/spark/pull/18833
  
    Thanks! Merged to master.


---

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


[GitHub] spark issue #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

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


---

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


[GitHub] spark issue #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

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


---

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


[GitHub] spark issue #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    @maropu that only works for literals. I am sort-of in favor of the Hive default; it seems kinda bad to bring down a job because of negative value.


---
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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

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


---

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


[GitHub] spark issue #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/80214/
    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 #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    Pg does not accept this query;
    ```
    postgres=# select sqrt(3);
           sqrt       
    ------------------
     1.73205080756888
    (1 row)
    
    postgres=# select sqrt(-1);
    ERROR:  cannot take square root of a negative number
    ```
    So, Another solution is to fail in analysis.


---
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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

    https://github.com/apache/spark/pull/18833
  
    **[Test build #83461 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/83461/testReport)** for PR 18833 at commit [`cbbfa5e`](https://github.com/apache/spark/commit/cbbfa5edf8d9edf1d25fb1c456725cac73418602).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, \"SQRT\")`


---

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


[GitHub] spark issue #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    @hvanhovell yea, both is okay to me. just suggestion.


---
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 #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    **[Test build #80214 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/80214/testReport)** for PR 18833 at commit [`3e9ec8c`](https://github.com/apache/spark/commit/3e9ec8cceac6320f2f33069d454822cf90c354a8).


---
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 #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    **[Test build #80214 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/80214/testReport)** for PR 18833 at commit [`3e9ec8c`](https://github.com/apache/spark/commit/3e9ec8cceac6320f2f33069d454822cf90c354a8).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, \"SQRT\") `


---
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 #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    Can we document this difference in https://spark.apache.org/docs/latest/sql-programming-guide.html#compatibility-with-apache-hive?


---

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


[GitHub] spark pull request #18833: [SPARK-21625][DOC] Add incompatible Hive UDF desc...

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

    https://github.com/apache/spark/pull/18833#discussion_r148965438
  
    --- Diff: docs/sql-programming-guide.md ---
    @@ -1957,6 +1957,14 @@ Not all the APIs of the Hive UDF/UDTF/UDAF are supported by Spark SQL. Below are
       Spark SQL currently does not support the reuse of aggregation.
     * `getWindowingEvaluator` (`GenericUDAFEvaluator`) is a function to optimize aggregation by evaluating
       an aggregate over a fixed window.
    +  
    +### Incompatible Hive UDF
    +
    +Below is a list of Hive UDFs that we don't incompatible yet.
    --- End diff --
    
    ? Below are the scenarios in which Hive and Spark generate different results


---

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


[GitHub] spark pull request #18833: [SPARK-21625][SQL] sqrt(negative number) should b...

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

    https://github.com/apache/spark/pull/18833#discussion_r131565248
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala ---
    @@ -403,11 +403,13 @@ class MathExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
     
       test("sqrt") {
         testUnary(Sqrt, math.sqrt, (0 to 20).map(_ * 0.1))
    -    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNaN = true)
    +    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNull = true)
    --- End diff --
    
    Looks like you're changing the NaN cases for many math expressions to Null. I'm not sure if we can do thing like this to break compatibility.


---
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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

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


---

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


[GitHub] spark issue #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

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


---

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


[GitHub] spark pull request #18833: [SPARK-21625][SQL] sqrt(negative number) should b...

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

    https://github.com/apache/spark/pull/18833#discussion_r131566102
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala ---
    @@ -403,11 +403,13 @@ class MathExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
     
       test("sqrt") {
         testUnary(Sqrt, math.sqrt, (0 to 20).map(_ * 0.1))
    -    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNaN = true)
    +    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNull = true)
    --- End diff --
    
    Yes, we migrated Hive and MySQL SQLs to Spark, and found some inconsistencies. `NaN` is unfamiliar to MySQL and Oracle users


---
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 #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/80200/
    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 #18833: [SPARK-21625][SQL] sqrt(negative number) should b...

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

    https://github.com/apache/spark/pull/18833#discussion_r131568132
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala ---
    @@ -403,11 +403,13 @@ class MathExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
     
       test("sqrt") {
         testUnary(Sqrt, math.sqrt, (0 to 20).map(_ * 0.1))
    -    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNaN = true)
    +    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNull = true)
    --- End diff --
    
    We have `IsNaN`. So users might already use it to check those invalid values.


---
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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

    https://github.com/apache/spark/pull/18833
  
    **[Test build #83466 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/83466/testReport)** for PR 18833 at commit [`07cedb5`](https://github.com/apache/spark/commit/07cedb54eb47f0a18ad373a4d2c88216da971159).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

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


---

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


[GitHub] spark issue #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

    https://github.com/apache/spark/pull/18833
  
    **[Test build #80200 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/80200/testReport)** for PR 18833 at commit [`f346f5b`](https://github.com/apache/spark/commit/f346f5b240f20b653d4a2c6eaf11660f7f7ff98b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `abstract class UnaryNonnegativeExpression(f: Double => Double, name: String)`
      * `case class Sqrt(child: Expression) extends UnaryNonnegativeExpression(math.sqrt, \"SQRT\")`


---
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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

    https://github.com/apache/spark/pull/18833
  
    **[Test build #83466 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/83466/testReport)** for PR 18833 at commit [`07cedb5`](https://github.com/apache/spark/commit/07cedb54eb47f0a18ad373a4d2c88216da971159).


---

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


[GitHub] spark issue #18833: [SPARK-21625][DOC] Add incompatible Hive UDF describe to...

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

    https://github.com/apache/spark/pull/18833
  
    retest this please


---

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


[GitHub] spark pull request #18833: [SPARK-21625][SQL] sqrt(negative number) should b...

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

    https://github.com/apache/spark/pull/18833#discussion_r131566009
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala ---
    @@ -403,11 +403,13 @@ class MathExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
     
       test("sqrt") {
         testUnary(Sqrt, math.sqrt, (0 to 20).map(_ * 0.1))
    -    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNaN = true)
    +    testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNull = true)
    --- End diff --
    
    Yea, I was writing this comment. If `NaN` makes sense in a way, I was thinking we couldn't consider this case as a bug that should be fixed.


---
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 #18833: [SPARK-21625][SQL] sqrt(negative number) should be null.

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

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


---
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 #18833: [SPARK-21625][DOC] Add incompatible Hive UDF desc...

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

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


---

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