{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/21383","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/21383/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/21383/comments","events_url":"https://api.github.com/repos/apache/spark/issues/21383/events","html_url":"https://github.com/apache/spark/pull/21383","id":325016787,"number":21383,"title":"[SPARK-23754][Python] Re-raising StopIteration in client code","user":{"login":"e-dorigatti","id":5585926,"avatar_url":"https://avatars1.githubusercontent.com/u/5585926?v=4","gravatar_id":"","url":"https://api.github.com/users/e-dorigatti","html_url":"https://github.com/e-dorigatti","followers_url":"https://api.github.com/users/e-dorigatti/followers","following_url":"https://api.github.com/users/e-dorigatti/following{/other_user}","gists_url":"https://api.github.com/users/e-dorigatti/gists{/gist_id}","starred_url":"https://api.github.com/users/e-dorigatti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-dorigatti/subscriptions","organizations_url":"https://api.github.com/users/e-dorigatti/orgs","repos_url":"https://api.github.com/users/e-dorigatti/repos","events_url":"https://api.github.com/users/e-dorigatti/events{/privacy}","received_events_url":"https://api.github.com/users/e-dorigatti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2018-05-21T18:37:51Z","updated_at":"2018-05-24T18:49:55Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/21383","html_url":"https://github.com/apache/spark/pull/21383","diff_url":"https://github.com/apache/spark/pull/21383.diff","patch_url":"https://github.com/apache/spark/pull/21383.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nMake sure that `StopIteration`s raised in users' code do not silently interrupt processing by spark, but are raised as exceptions to the users. The users' functions are wrapped in `safe_iter` (in `shuffle.py`), which re-raises `StopIteration`s as `RuntimeError`s\r\n\r\n## How was this patch tested?\r\n\r\nUnit tests, making sure that the exceptions are indeed raised. I am not sure how to check whether a `Py4JJavaError` contains my exception, so I simply looked for the exception message in the java exception's `toString`. Can you propose a better way?\r\n\r\n## License\r\n\r\nThis is my original work, licensed in the same way as spark"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/391820786","html_url":"https://github.com/apache/spark/pull/21383#issuecomment-391820786","issue_url":"https://api.github.com/repos/apache/spark/issues/21383","id":391820786,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars1.githubusercontent.com/u/8108735?v=4","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2018-05-24T18:49:55Z","updated_at":"2018-05-24T18:49:55Z","author_association":"NONE","body":"**[Test build #91119 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/91119/testReport)** for PR 21383 at commit [`90b064d`](https://github.com/apache/spark/commit/90b064ddd2db562e90dd55846f1331779e795460).\n * This patch **fails PySpark unit tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}