You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zero323 <gi...@git.apache.org> on 2016/12/02 20:22:30 UTC

[GitHub] spark pull request #16123: [SPARK-18690][PYTHON][SQL]

GitHub user zero323 opened a pull request:

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

    [SPARK-18690][PYTHON][SQL]

    ## What changes were proposed in this pull request?
    
    Makes `Window.unboundedPreceding` and `Window.unboundedFollowing` backward compatible.
    
    ## How was this patch tested?
    
    Pyspark SQL unittests.
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.


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

    $ git pull https://github.com/zero323/spark SPARK-17845-follow-up

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

    https://github.com/apache/spark/pull/16123.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 #16123
    
----
commit b1f4d8218629b56b0982ee58f5b93a40305985e0
Author: zero323 <ze...@users.noreply.github.com>
Date:   2016-12-01T17:22:32Z

    Introduce Window._PRECEDING_THRESHOLD and Window._FOLLOWING_THRESHOLD to ensure backward compatibility

commit 19e0a24ded67be7d346d0a7e614d5c9ce54c5a86
Author: zero323 <ze...@users.noreply.github.com>
Date:   2016-12-02T19:08:48Z

    Add unbounded frame tests with sys.maxsize dependency

----


---
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 issue #16123: [SPARK-18690][PYTHON][SQL]

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

    https://github.com/apache/spark/pull/16123
  
    **[Test build #69585 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69585/consoleFull)** for PR 16123 at commit [`19e0a24`](https://github.com/apache/spark/commit/19e0a24ded67be7d346d0a7e614d5c9ce54c5a86).


---
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 issue #16123: [SPARK-18690][PYTHON][SQL]

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16123
  
    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 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 issue #16123: [SPARK-18690][PYTHON][SQL]

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the issue:

    https://github.com/apache/spark/pull/16123
  
    Can you put a more descriptive title?


---
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 issue #16123: [SPARK-18690][PYTHON][SQL] Backward compatibility of unb...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the issue:

    https://github.com/apache/spark/pull/16123
  
    Thanks - merging in master/branch-2.1.



---
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 issue #16123: [SPARK-18690][PYTHON][SQL]

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16123
  
    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 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 issue #16123: [SPARK-18690][PYTHON][SQL]

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

    https://github.com/apache/spark/pull/16123
  
    **[Test build #69586 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69586/consoleFull)** for PR 16123 at commit [`2106388`](https://github.com/apache/spark/commit/2106388551af538b288363ad4aee21a16375bcba).
     * This patch passes all 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 issue #16123: [SPARK-18690][PYTHON][SQL]

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

    https://github.com/apache/spark/pull/16123
  
    **[Test build #69585 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69585/consoleFull)** for PR 16123 at commit [`19e0a24`](https://github.com/apache/spark/commit/19e0a24ded67be7d346d0a7e614d5c9ce54c5a86).
     * This patch **fails Python style 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 issue #16123: [SPARK-18690][PYTHON][SQL] Backward compatibility of unb...

Posted by zero323 <gi...@git.apache.org>.
Github user zero323 commented on the issue:

    https://github.com/apache/spark/pull/16123
  
    Sorry, long day. I was pretty sure I did.



---
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 #16123: [SPARK-18690][PYTHON][SQL] Backward compatibility...

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

    https://github.com/apache/spark/pull/16123#discussion_r90725698
  
    --- Diff: python/pyspark/sql/tests.py ---
    @@ -1980,6 +1980,41 @@ def assert_runs_only_one_job_stage_and_task(job_group_name, f):
             # Regression test for SPARK-17514: limit(n).collect() should the perform same as take(n)
             assert_runs_only_one_job_stage_and_task("collect_limit", lambda: df.limit(1).collect())
     
    +    @unittest.skipIf(sys.version_info < (3, 3), "Unittest < 3.3 doesn't support mocking")
    +    def test_unbounded_frames(self):
    +        from unittest.mock import patch
    +        from pyspark.sql import functions as F
    +        from pyspark.sql import window
    +        import importlib
    +
    +        df = self.spark.range(0, 3)
    +
    +        def rows_frame_match():
    +            return "ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING" in df.select(
    +                F.count("*").over(window.Window.rowsBetween(-sys.maxsize, sys.maxsize))
    +            ).columns[0]
    +
    +        def range_frame_match():
    +            return "RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING" in df.select(
    +                F.count("*").over(window.Window.rangeBetween(-sys.maxsize, sys.maxsize))
    +            ).columns[0]
    +
    +        with patch("sys.maxsize", 2 ** 31 - 1):
    +            importlib.reload(window)
    --- End diff --
    
    This is something I don't like but it looks better than alternatives:
    - Converting thresholds to methods so current `sys.maxsize` is picked up.
    - Mocking thresholds as well.


---
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 issue #16123: [SPARK-18690][PYTHON][SQL]

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16123
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/69586/
    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 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 issue #16123: [SPARK-18690][PYTHON][SQL]

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

    https://github.com/apache/spark/pull/16123
  
    **[Test build #69586 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69586/consoleFull)** for PR 16123 at commit [`2106388`](https://github.com/apache/spark/commit/2106388551af538b288363ad4aee21a16375bcba).


---
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 issue #16123: [SPARK-18690][PYTHON][SQL]

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16123
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/69585/
    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 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 #16123: [SPARK-18690][PYTHON][SQL] Backward compatibility...

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

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


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