[GitHub] spark pull request #17350: [SPARK-20017][SQL] change the nullability of func...

2017-03-21 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 #17350: [SPARK-20017][SQL] change the nullability of func...

2017-03-20 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/17350#discussion_r107073563
  
--- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ComplexTypeSuite.scala
 ---
@@ -251,6 +251,9 @@ class ComplexTypeSuite extends SparkFunSuite with 
ExpressionEvalHelper {
   }
 
   test("StringToMap") {
+val expectedDataType = MapType(StringType, StringType, 
valueContainsNull = true)
+assert(new StringToMap("").dataType === expectedDataType)
+
--- End diff --

I am fine to keep the test case here, but also call `checkEvaluation` to 
verify the result, if you do not know how to add test cases to 
`string-function.sql`


---
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 #17350: [SPARK-20017][SQL] change the nullability of func...

2017-03-20 Thread wzhfy
Github user wzhfy commented on a diff in the pull request:

https://github.com/apache/spark/pull/17350#discussion_r107069733
  
--- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ComplexTypeSuite.scala
 ---
@@ -251,6 +251,9 @@ class ComplexTypeSuite extends SparkFunSuite with 
ExpressionEvalHelper {
   }
 
   test("StringToMap") {
+val expectedDataType = MapType(StringType, StringType, 
valueContainsNull = true)
+assert(new StringToMap("").dataType === expectedDataType)
+
--- End diff --

+1 please add a separate test case for this change.


---
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 #17350: [SPARK-20017][SQL] change the nullability of func...

2017-03-20 Thread maropu
Github user maropu commented on a diff in the pull request:

https://github.com/apache/spark/pull/17350#discussion_r107049220
  
--- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ComplexTypeSuite.scala
 ---
@@ -251,6 +251,9 @@ class ComplexTypeSuite extends SparkFunSuite with 
ExpressionEvalHelper {
   }
 
   test("StringToMap") {
+val expectedDataType = MapType(StringType, StringType, 
valueContainsNull = true)
+assert(new StringToMap("").dataType === expectedDataType)
+
--- End diff --

Separate this test instead of adding the existing 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 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 #17350: [SPARK-20017][SQL] change the nullability of func...

2017-03-19 Thread zhaorongsheng
GitHub user zhaorongsheng opened a pull request:

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

[SPARK-20017][SQL] change the nullability of function 'StringToMap' from 
'false' to 'true'

## What changes were proposed in this pull request?

Change the nullability of function `StringToMap` from `false` to `true`.



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

$ git pull https://github.com/zhaorongsheng/spark bug-fix_strToMap_NPE

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

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


commit d4bb1583650e44e556bf06d1503355d7529e1ac6
Author: zhaorongsheng <334362...@qq.com>
Date:   2017-03-18T16:03:34Z

Merge remote-tracking branch 'upstream/master' into master_git

commit ee2d7e6aee4248cec124457b5b03da5aa790c984
Author: zhaorongsheng <334362...@qq.com>
Date:   2017-03-19T15:48:15Z

SPARK-20017 change the nullability of 'StringToMap'




---
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