[GitHub] spark pull request #22126: [SPARK-23938][SQL][FOLLOW-UP][TEST] Nullabilities...

2018-08-16 Thread asfgit
Github user asfgit closed the pull request at:

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


---

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



[GitHub] spark pull request #22126: [SPARK-23938][SQL][FOLLOW-UP][TEST] Nullabilities...

2018-08-16 Thread mn-mikke
Github user mn-mikke commented on a diff in the pull request:

https://github.com/apache/spark/pull/22126#discussion_r210724650
  
--- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/HigherOrderFunctionsSuite.scala
 ---
@@ -363,9 +363,9 @@ class HigherOrderFunctionsSuite extends SparkFunSuite 
with ExpressionEvalHelper
 left: Expression,
 right: Expression,
 f: (Expression, Expression, Expression) => Expression): Expression 
= {
-  val MapType(kt, vt1, vcn1) = left.dataType.asInstanceOf[MapType]
-  val MapType(_, vt2, vcn2) = right.dataType.asInstanceOf[MapType]
-  MapZipWith(left, right, createLambda(kt, false, vt1, vcn1, vt2, 
vcn2, f))
+  val MapType(kt, vt1, _) = left.dataType.asInstanceOf[MapType]
--- End diff --

Optional suggestion: Maybe we could remove```asInstanceOf[MapType]```  here?


---

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



[GitHub] spark pull request #22126: [SPARK-23938][SQL][FOLLOW-UP][TEST] Nullabilities...

2018-08-16 Thread ueshin
GitHub user ueshin opened a pull request:

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

[SPARK-23938][SQL][FOLLOW-UP][TEST] Nullabilities of value arguments should 
be true.

## What changes were proposed in this pull request?

This is a follow-up pr of #22017 which added `map_zip_with` function.
In the test, when creating a lambda function, we use the 
`valueContainsNull` values for the nullabilities of the value arguments, but we 
should've used `true` as the same as `bind` method because the values might be 
`null` if the keys don't match.

## How was this patch tested?

Added small tests and existing tests.


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

$ git pull https://github.com/ueshin/apache-spark 
issues/SPARK-23938/fix_tests

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

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


commit c005109ac517bc8db687318f5e93a35a1ae785c3
Author: Takuya UESHIN 
Date:   2018-08-16T19:14:34Z

Fix a test.




---

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