{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/15899","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/15899/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/15899/comments","events_url":"https://api.github.com/repos/apache/spark/issues/15899/events","html_url":"https://github.com/apache/spark/pull/15899","id":189600087,"number":15899,"title":"[SPARK-18466] added withFilter method to RDD","user":{"login":"reggert","id":1971881,"avatar_url":"https://avatars.githubusercontent.com/u/1971881?v=3","gravatar_id":"","url":"https://api.github.com/users/reggert","html_url":"https://github.com/reggert","followers_url":"https://api.github.com/users/reggert/followers","following_url":"https://api.github.com/users/reggert/following{/other_user}","gists_url":"https://api.github.com/users/reggert/gists{/gist_id}","starred_url":"https://api.github.com/users/reggert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reggert/subscriptions","organizations_url":"https://api.github.com/users/reggert/orgs","repos_url":"https://api.github.com/users/reggert/repos","events_url":"https://api.github.com/users/reggert/events{/privacy}","received_events_url":"https://api.github.com/users/reggert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-16T06:00:44Z","updated_at":"2016-11-16T15:59:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/15899","html_url":"https://github.com/apache/spark/pull/15899","diff_url":"https://github.com/apache/spark/pull/15899.diff","patch_url":"https://github.com/apache/spark/pull/15899.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nA `withFilter` method has been added to `RDD` as an alias for the `filter` method. When using `for` comprehensions, the Scala compiler prefers (and as of 2.12, _requires_) the lazy `withFilter` method, only falling back to using the `filter` method (which, for regular collections, is non-lazy, but for RDDs is lazy). Prior to Scala 2.12, this fallback causes the compiler to emit a warning, and as of Scala 2.12, it results in an error.\r\n\r\n## How was this patch tested?\r\n\r\n`RDDSuite` was updated by adding a line to \"basic operations\" that duplicates the behavior of the `filter` test, but uses a `for` comprehension instead of a direct method call.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/260984414","html_url":"https://github.com/apache/spark/pull/15899#issuecomment-260984414","issue_url":"https://api.github.com/repos/apache/spark/issues/15899","id":260984414,"user":{"login":"srowen","id":822522,"avatar_url":"https://avatars.githubusercontent.com/u/822522?v=3","gravatar_id":"","url":"https://api.github.com/users/srowen","html_url":"https://github.com/srowen","followers_url":"https://api.github.com/users/srowen/followers","following_url":"https://api.github.com/users/srowen/following{/other_user}","gists_url":"https://api.github.com/users/srowen/gists{/gist_id}","starred_url":"https://api.github.com/users/srowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srowen/subscriptions","organizations_url":"https://api.github.com/users/srowen/orgs","repos_url":"https://api.github.com/users/srowen/repos","events_url":"https://api.github.com/users/srowen/events{/privacy}","received_events_url":"https://api.github.com/users/srowen/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T15:59:00Z","updated_at":"2016-11-16T15:59:00Z","body":"OK, that makes sense. Yes, of course in reality it's just syntactic sugar. I suppose I wonder: if this works, are there other sugary things one would expect to work that don't? and, does it add to confusion about what's happening locally vs remotely? but maybe the latter isn't a big enough reason to not provide the possibility of the syntax."}}
{"actor":{"display_login":"srowen"}}