{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/5938","labels_url":"https://api.github.com/repos/apache/spark/issues/5938/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/5938/comments","events_url":"https://api.github.com/repos/apache/spark/issues/5938/events","html_url":"https://github.com/apache/spark/pull/5938","id":73574940,"number":5938,"title":"[SPARK-6812][SparkR] filter() on DataFrame does not work as expected.","user":{"login":"sun-rui","id":2528327,"avatar_url":"https://avatars.githubusercontent.com/u/2528327?v=3","gravatar_id":"","url":"https://api.github.com/users/sun-rui","html_url":"https://github.com/sun-rui","followers_url":"https://api.github.com/users/sun-rui/followers","following_url":"https://api.github.com/users/sun-rui/following{/other_user}","gists_url":"https://api.github.com/users/sun-rui/gists{/gist_id}","starred_url":"https://api.github.com/users/sun-rui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sun-rui/subscriptions","organizations_url":"https://api.github.com/users/sun-rui/orgs","repos_url":"https://api.github.com/users/sun-rui/repos","events_url":"https://api.github.com/users/sun-rui/events{/privacy}","received_events_url":"https://api.github.com/users/sun-rui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-06T09:48:45Z","updated_at":"2015-05-06T09:52:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/5938","html_url":"https://github.com/apache/spark/pull/5938","diff_url":"https://github.com/apache/spark/pull/5938.diff","patch_url":"https://github.com/apache/spark/pull/5938.patch"},"body":"According to the R manual: https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html,\r\n\" if a function .First is found on the search path, it is executed as .First(). Finally, function .First.sys() in the base package is run. This calls require to attach the default packages specified by options(\"defaultPackages\").\"\r\nIn .First() in profile/shell.R, we load SparkR package. This means SparkR package is loaded before default packages. If there are same names in default packages, they will overwrite those in SparkR. This is why filter() in SparkR is masked by filter() in stats, which is usually in the default package list.\r\nWe need to make sure SparkR is loaded after default packages. The solution is to append SparkR to default packages, instead of loading SparkR in .First().\r\n\r\nBTW, I'd like to discuss our policy on how to solve name conflict. Previously, we rename API names from Scala API if there is name conflict with base or other commonly-used packages. However, from long term perspective, this is not good for API stability, because we can't predict name conflicts, for example, if in the future a name added in base package conflicts with an API in SparkR? So the better policy is to keep API name same as Scala's without worrying about name conflicts. When users use SparkR, they should load SparkR as last package, so that all API names are effective. Use can explicitly use :: to refer to hidden names from other packages. If we agree on this, I can submit a JIRA issue to change back some rename API methods, for example, DataFrame.sortDF()."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/99402377","html_url":"https://github.com/apache/spark/pull/5938#issuecomment-99402377","issue_url":"https://api.github.com/repos/apache/spark/issues/5938","id":99402377,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T09:52:15Z","updated_at":"2015-05-06T09:52:15Z","body":"Merged build started."}}