[GitHub] spark pull request #14434: [SPARK-16828][SQL] remove MaxOf and MinOf

2016-08-01 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14434: [SPARK-16828][SQL] remove MaxOf and MinOf

2016-08-01 Thread cloud-fan
Github user cloud-fan commented on a diff in the pull request:

https://github.com/apache/spark/pull/14434#discussion_r73073652
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
@@ -662,10 +662,6 @@ object NullPropagation extends Rule[LogicalPlan] {
   case e @ Substring(_, Literal(null, _), _) => Literal.create(null, 
e.dataType)
   case e @ Substring(_, _, Literal(null, _)) => Literal.create(null, 
e.dataType)
 
-  // MaxOf and MinOf can't do null propagation
-  case e: MaxOf => e
-  case e: MinOf => e
--- End diff --

no, we put `MaxOf` and `MinOf` here because they are a special case of 
`BinaryArithmetic`, but `Greatest` and `Least` is not binary.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14434: [SPARK-16828][SQL] remove MaxOf and MinOf

2016-08-01 Thread yhuai
Github user yhuai commented on a diff in the pull request:

https://github.com/apache/spark/pull/14434#discussion_r73023513
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
@@ -662,10 +662,6 @@ object NullPropagation extends Rule[LogicalPlan] {
   case e @ Substring(_, Literal(null, _), _) => Literal.create(null, 
e.dataType)
   case e @ Substring(_, _, Literal(null, _)) => Literal.create(null, 
e.dataType)
 
-  // MaxOf and MinOf can't do null propagation
-  case e: MaxOf => e
-  case e: MinOf => e
--- End diff --

Do `Greatest` and `Least` support null propagation?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14434: [SPARK-16828][SQL] remove MaxOf and MinOf

2016-08-01 Thread cloud-fan
GitHub user cloud-fan opened a pull request:

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

[SPARK-16828][SQL] remove MaxOf and MinOf

## What changes were proposed in this pull request?

These 2 expressions are not needed anymore after we have `Greatest` and 
`Least`. This PR removes them and related tests.


## How was this patch tested?

N/A

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

$ git pull https://github.com/cloud-fan/spark minor1

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

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


commit ce0b9fee5006e0dc89869e25056ccaa72db972e5
Author: Wenchen Fan 
Date:   2016-08-01T06:07:32Z

remove MaxOf and MinOf




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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