[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread cloud-fan
Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47428568 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF( /

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/10266 --- 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 ena

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47392510 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF(

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-164022078 Test PASSed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-164022075 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 projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-164021742 **[Test build #47585 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47585/consoleFull)** for PR 10266 at commit [`2125a1b`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread yhuai
Github user yhuai commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47391422 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF( // su

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-164020361 **[Test build #2205 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2205/consoleFull)** for PR 10266 at commit [`2125a1b`](https://

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread yhuai
Github user yhuai commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47391269 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF( // su

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47391109 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF(

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread davies
Github user davies commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47389510 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF( // s

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47388587 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF(

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-164009410 **[Test build #2204 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2204/consoleFull)** for PR 10266 at commit [`2125a1b`](https://

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163998492 **[Test build #47585 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47585/consoleFull)** for PR 10266 at commit [`2125a1b`](https://gi

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163997902 **[Test build #2205 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2205/consoleFull)** for PR 10266 at commit [`2125a1b`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread yhuai
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163997363 test 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 featur

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163996602 **[Test build #47584 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47584/consoleFull)** for PR 10266 at commit [`2125a1b`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163996672 Test FAILed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163996670 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 projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163986683 **[Test build #47584 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47584/consoleFull)** for PR 10266 at commit [`2125a1b`](https://gi

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread yhuai
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163983570 test 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 featur

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163984799 **[Test build #2204 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2204/consoleFull)** for PR 10266 at commit [`2125a1b`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread yhuai
Github user yhuai commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47374514 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF( // su

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread markhamstra
Github user markhamstra commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163972430 Works for me. Thanks, guys! --- 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 no

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread cloud-fan
Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/10266#discussion_r47351058 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala --- @@ -1029,24 +1029,27 @@ case class ScalaUDF( /

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163903666 Test FAILed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163903664 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 projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163903552 **[Test build #47578 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47578/consoleFull)** for PR 10266 at commit [`2125a1b`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163879143 **[Test build #47578 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47578/consoleFull)** for PR 10266 at commit [`2125a1b`](https://gi

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread davies
Github user davies commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163876482 @cloud-fan @markhamstra They should be all fixed (handling null in arguments and results). --- If your project is set up for it, you can reply to this email and have yo

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-11 Thread cloud-fan
Github user cloud-fan commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163874386 hi @markhamstra , can you add some log in your UDF, to see if the NPE occurred before run into your UDF code or after? --- If your project is set up for it, you can

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163868758 Test PASSed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163868667 **[Test build #47574 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47574/consoleFull)** for PR 10266 at commit [`c96b512`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163868756 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 projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163867183 **[Test build #2202 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2202/consoleFull)** for PR 10266 at commit [`c96b512`](https://

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163862856 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 projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163862860 Test PASSed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163862544 **[Test build #47572 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47572/consoleFull)** for PR 10266 at commit [`c0f85bb`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread markhamstra
Github user markhamstra commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163861470 @davies The exact same UDF worked fine in 1.5. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If yo

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread davies
Github user davies commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163860387 @markhamstra I think it's because of your UDF did not handle null correctly. --- If your project is set up for it, you can reply to this email and have your reply appear

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread markhamstra
Github user markhamstra commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163858860 Still doesn't work for me. Now it ends up in a different place, but a NPE: ``` ... 2015-12-11 06:48:09,285 INFO org.apache.spark.sql.catalyst.expression

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread markhamstra
Github user markhamstra commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163856161 @davies No -- see the other PR. --- 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

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163855980 **[Test build #47574 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47574/consoleFull)** for PR 10266 at commit [`c96b512`](https://gi

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread cloud-fan
Github user cloud-fan commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163855851 LGTM pending 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

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread davies
Github user davies commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163855762 @markhamstra Once it works, I will merge this to unblock RC2. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as w

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread markhamstra
Github user markhamstra commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163855637 No problem; I'll cherry-pick another. --- 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 projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread davies
Github user davies commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163855563 @markhamstra Sorry, just pushed a commit to fix it now, added a regression test. --- If your project is set up for it, you can reply to this email and have your reply a

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163855486 **[Test build #2202 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2202/consoleFull)** for PR 10266 at commit [`c96b512`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread markhamstra
Github user markhamstra commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163855481 @davies This results in a slightly different failure from the one I previously reported: Everything looks the same as the prior post except now: ```

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread davies
Github user davies commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163855323 It's not a Janino bug, `(Integer)-1` does not work in Java, faint :-( --- If your project is set up for it, you can reply to this email and have your reply appear on Git

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread cloud-fan
Github user cloud-fan commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163852763 I changed `int` to `Integer` and tried again ,the result is the same. And I also tried `Integer i = (Integer) -1;` which also failed to compile. I think the problem i

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread yhuai
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163851041 Wenchen, should the type of i be Integer? --- 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

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread davies
Github user davies commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163848082 Could you try to add `(Integer)` before `null`? --- 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 p

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163847683 **[Test build #47572 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47572/consoleFull)** for PR 10266 at commit [`c0f85bb`](https://gi

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread cloud-fan
Github user cloud-fan commented on the pull request: https://github.com/apache/spark/pull/10266#issuecomment-163847721 I tried it locally, here is my findings: * `int i = false ? null : (Integer) -1;` **doesn't compile** * `int i = false ? null : (Integer) 1;` compiles

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread davies
Github user davies commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163846453 @markhamstra Does https://github.com/apache/spark/pull/10266 fix it? --- If your project is set up for it, you can reply to this email and have your reply appear on GitH

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF...

2015-12-10 Thread davies
GitHub user davies opened a pull request: https://github.com/apache/spark/pull/10266 [SPARK-12258] [SQL] passing null into ScalaUDF (follow-up) This is a follow-up PR for #10259 You can merge this pull request into a Git repository by running: $ git pull https://github.com/dav

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread cloud-fan
Github user cloud-fan commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163844582 hi @markhamstra , can you share you test code? so that we can reproduce it, thanks! --- If your project is set up for it, you can reply to this email and have your r

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread markhamstra
Github user markhamstra commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163843237 Sorry, but after this I am now seeing codeGen errors. Like this: ``` testTimestampArithmeticUDFs(com.clearstorydata.dataengine.udfs.TestTimestampArithmeticU

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/10259 --- 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 ena

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163802039 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 projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163802040 Test PASSed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163801918 **[Test build #47552 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47552/consoleFull)** for PR 10259 at commit [`4636fe3`](https://g

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread gatorsmile
Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163801607 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 enabl

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread yhuai
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163797546 LGTM pending jenkins. --- 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 f

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread yhuai
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163796308 I tried use `java.lang` types and the result look good. @davies how about we update our doc (the `Data Types` section) to explain that those primitive types are n

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread gatorsmile
Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163794997 Ok, I see your point. This is a possible workaround. It works well when the input values of primitive types are not null. I am just afraid how users know th

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread davies
Github user davies commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163792666 @gatorsmile Because your UDF is using primitive types, we have to chance to pass `null` in. In order to got the behavior you expect, you should change the UDF to use box

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread gatorsmile
Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163792580 Yeah. That is my understanding. ``` inputsNullCheck.map(If(_, Literal.create(null, udf.dataType), udf)).getOrElse(udf) ``` --- If your projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread yhuai
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163790754 the analyzer rule was introduced by https://github.com/apache/spark/pull/9770 ? --- If your project is set up for it, you can reply to this email and have your reply app

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread gatorsmile
Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163788875 Yeah. Below is the result of ```scala sql("SELECT * FROM test").show(); ``` ``` +++---+++++++++ | ti|

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread yhuai
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163788347 Does `INSERT INTO TABLE test VALUES` actually work? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If you

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread SparkQA
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163787742 **[Test build #47552 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47552/consoleFull)** for PR 10259 at commit [`4636fe3`](https://gi

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163787044 Test FAILed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread gatorsmile
Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163787017 Thank you @davies ! I guess we might still have a bug in the code. As long as any input variable is Null, the return result is `null`. Is that by design?

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163787042 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 projec

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread yhuai
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/10259#issuecomment-163786748 test 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 featur

[GitHub] spark pull request: [SPARK-12258] [SQL] passing null into ScalaUDF

2015-12-10 Thread davies
GitHub user davies opened a pull request: https://github.com/apache/spark/pull/10259 [SPARK-12258] [SQL] passing null into ScalaUDF Check nullability and passing them into ScalaUDF. Closes #10249 You can merge this pull request into a Git repository by running: $ git