You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by davies <gi...@git.apache.org> on 2014/09/03 04:00:22 UTC

[GitHub] spark pull request: [SPARK-3335] [SQL] [PySpark] support broadcast...

GitHub user davies opened a pull request:

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

    [SPARK-3335] [SQL] [PySpark] support broadcast in Python UDF

    After this patch, broadcast can be used in Python UDF.

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

    $ git pull https://github.com/davies/spark udf_broadcast

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

    https://github.com/apache/spark/pull/2243.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 #2243
    
----
commit 7b8886129f6841ec9b7782a5ac9477cb4b766c5e
Author: Davies Liu <da...@gmail.com>
Date:   2014-09-03T01:58:18Z

    support broadcast in UDF

----


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

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

    https://github.com/apache/spark/pull/2243#issuecomment-54250908
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/19630/consoleFull) for   PR 2243 at commit [`7b88861`](https://github.com/apache/spark/commit/7b8886129f6841ec9b7782a5ac9477cb4b766c5e).
     * This patch merges cleanly.


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

Posted by davies <gi...@git.apache.org>.
Github user davies commented on the pull request:

    https://github.com/apache/spark/pull/2243#issuecomment-54250646
  
    Jenkins, retest 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 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: [SPARK-3335] [SQL] [PySpark] support broadcast...

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

    https://github.com/apache/spark/pull/2243#discussion_r17087493
  
    --- Diff: python/pyspark/sql.py ---
    @@ -971,23 +969,26 @@ def registerFunction(self, name, f, returnType=StringType()):
             >>> sqlCtx.registerFunction("stringLengthInt", lambda x: len(x), IntegerType())
             >>> sqlCtx.sql("SELECT stringLengthInt('test')").collect()
             [Row(c0=4)]
    -        >>> sqlCtx.registerFunction("twoArgs", lambda x, y: len(x) + y, IntegerType())
    --- End diff --
    
    Ah, okay.  Maybe it's obvious how two-argument functions should work so we won't need to expose this in end-user documentation.


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

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

    https://github.com/apache/spark/pull/2243#discussion_r17087385
  
    --- Diff: python/pyspark/sql.py ---
    @@ -971,23 +969,26 @@ def registerFunction(self, name, f, returnType=StringType()):
             >>> sqlCtx.registerFunction("stringLengthInt", lambda x: len(x), IntegerType())
             >>> sqlCtx.sql("SELECT stringLengthInt('test')").collect()
             [Row(c0=4)]
    -        >>> sqlCtx.registerFunction("twoArgs", lambda x, y: len(x) + y, IntegerType())
    --- End diff --
    
    The test cases in docstring will appear in API docs, so it's not good idea to put many test cases in docstring (especially for edge cases). 


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

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

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


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/2243#issuecomment-54395189
  
    Thanks! Merged to master.


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

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

    https://github.com/apache/spark/pull/2243#issuecomment-54243309
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/19620/consoleFull) for   PR 2243 at commit [`7b88861`](https://github.com/apache/spark/commit/7b8886129f6841ec9b7782a5ac9477cb4b766c5e).
     * This patch merges cleanly.


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:

    https://github.com/apache/spark/pull/2243#issuecomment-54377659
  
    LGTM!  This looks like a pretty simple fix, since the old code just neglected to handle broadcast variables.
    
    I'll merge this into master.


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

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

    https://github.com/apache/spark/pull/2243#issuecomment-54248691
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/19620/consoleFull) for   PR 2243 at commit [`7b88861`](https://github.com/apache/spark/commit/7b8886129f6841ec9b7782a5ac9477cb4b766c5e).
     * This patch **fails** unit tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

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

    https://github.com/apache/spark/pull/2243#discussion_r17085030
  
    --- Diff: python/pyspark/sql.py ---
    @@ -971,23 +969,26 @@ def registerFunction(self, name, f, returnType=StringType()):
             >>> sqlCtx.registerFunction("stringLengthInt", lambda x: len(x), IntegerType())
             >>> sqlCtx.sql("SELECT stringLengthInt('test')").collect()
             [Row(c0=4)]
    -        >>> sqlCtx.registerFunction("twoArgs", lambda x, y: len(x) + y, IntegerType())
    --- End diff --
    
    Actually, hold on a second: why did you move this test case from the doctests to `tests.py`?


---
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: [SPARK-3335] [SQL] [PySpark] support broadcast...

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

    https://github.com/apache/spark/pull/2243#issuecomment-54256256
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/19630/consoleFull) for   PR 2243 at commit [`7b88861`](https://github.com/apache/spark/commit/7b8886129f6841ec9b7782a5ac9477cb4b766c5e).
     * This patch **passes** unit tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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