{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/9364","labels_url":"https://api.github.com/repos/apache/spark/issues/9364/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/9364/comments","events_url":"https://api.github.com/repos/apache/spark/issues/9364/events","html_url":"https://github.com/apache/spark/pull/9364","id":114157030,"number":9364,"title":"[SPARK-11410] [SQL] Add APIs to provide functionality similar to Hive…","user":{"login":"nongli","id":242468,"avatar_url":"https://avatars.githubusercontent.com/u/242468?v=3","gravatar_id":"","url":"https://api.github.com/users/nongli","html_url":"https://github.com/nongli","followers_url":"https://api.github.com/users/nongli/followers","following_url":"https://api.github.com/users/nongli/following{/other_user}","gists_url":"https://api.github.com/users/nongli/gists{/gist_id}","starred_url":"https://api.github.com/users/nongli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nongli/subscriptions","organizations_url":"https://api.github.com/users/nongli/orgs","repos_url":"https://api.github.com/users/nongli/repos","events_url":"https://api.github.com/users/nongli/events{/privacy}","received_events_url":"https://api.github.com/users/nongli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-29T22:02:17Z","updated_at":"2015-11-01T19:17:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/9364","html_url":"https://github.com/apache/spark/pull/9364","diff_url":"https://github.com/apache/spark/pull/9364.diff","patch_url":"https://github.com/apache/spark/pull/9364.patch"},"body":"…'s DISTRIBUTE BY\r\n\r\nDISTRIBUTE BY allows the user to hash partition the data by specified exprs. It also allows for\r\noptioning sorting within each resulting partition. There is no required relationship between the\r\nexprs for partitioning and sorting (i.e. one does not need to be a prefix of the other).\r\n\r\nThis patch adds to APIs to DataFrames which can be used together to provide this functionality:\r\n  1. distributeBy() which partitions the data frame into a specified number of partitions using the\r\n     partitioning exprs.\r\n  2. localSort() which sorts each partition using the provided sorting exprs.\r\n\r\nTo get the DISTRIBUTE BY functionality, the user simply does: df.distributeBy(...).localSort(...)"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/152852982","html_url":"https://github.com/apache/spark/pull/9364#issuecomment-152852982","issue_url":"https://api.github.com/repos/apache/spark/issues/9364","id":152852982,"user":{"login":"yhuai","id":2072857,"avatar_url":"https://avatars.githubusercontent.com/u/2072857?v=3","gravatar_id":"","url":"https://api.github.com/users/yhuai","html_url":"https://github.com/yhuai","followers_url":"https://api.github.com/users/yhuai/followers","following_url":"https://api.github.com/users/yhuai/following{/other_user}","gists_url":"https://api.github.com/users/yhuai/gists{/gist_id}","starred_url":"https://api.github.com/users/yhuai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yhuai/subscriptions","organizations_url":"https://api.github.com/users/yhuai/orgs","repos_url":"https://api.github.com/users/yhuai/repos","events_url":"https://api.github.com/users/yhuai/events{/privacy}","received_events_url":"https://api.github.com/users/yhuai/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T19:17:46Z","updated_at":"2015-11-01T19:17:46Z","body":"ok to test"}}