{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/21240","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/21240/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/21240/comments","events_url":"https://api.github.com/repos/apache/spark/issues/21240/events","html_url":"https://github.com/apache/spark/pull/21240","id":320446378,"number":21240,"title":"[SPARK-21274][SQL] Add a new generator function replicate_rows to support EXCEPT ALL and INTERSECT ALL","user":{"login":"dilipbiswal","id":14225158,"avatar_url":"https://avatars0.githubusercontent.com/u/14225158?v=4","gravatar_id":"","url":"https://api.github.com/users/dilipbiswal","html_url":"https://github.com/dilipbiswal","followers_url":"https://api.github.com/users/dilipbiswal/followers","following_url":"https://api.github.com/users/dilipbiswal/following{/other_user}","gists_url":"https://api.github.com/users/dilipbiswal/gists{/gist_id}","starred_url":"https://api.github.com/users/dilipbiswal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilipbiswal/subscriptions","organizations_url":"https://api.github.com/users/dilipbiswal/orgs","repos_url":"https://api.github.com/users/dilipbiswal/repos","events_url":"https://api.github.com/users/dilipbiswal/events{/privacy}","received_events_url":"https://api.github.com/users/dilipbiswal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-05-04T22:17:10Z","updated_at":"2018-05-06T03:43:02Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/21240","html_url":"https://github.com/apache/spark/pull/21240","diff_url":"https://github.com/apache/spark/pull/21240.diff","patch_url":"https://github.com/apache/spark/pull/21240.patch"},"body":"## What changes were proposed in this pull request?\r\nAdd a new UDTF replicate_rows. This function replicates the values based on the first argument to the function. This will be used in EXCEPT ALL AND INTERSECT ALL transformation (future PR) mainly\r\nto preserve \"retain duplicates\" semantics.  Please refer to [Link](https://drive.google.com/open?id=1nyW0T0b_ajUduQoPgZLAsyHK8s3_dko3ulQuxaLpUXE) for design. The transformation code changes are in [Code](https://github.com/dilipbiswal/spark/tree/dkb_except_all_copy)\r\n\r\nExample \r\n```\r\nSELECT replicate_rows(3,  1,  2)\r\n```\r\nResult\r\n```\r\nspark-sql> SELECT replicate_rows(3, 1, 2);\r\n3\t1\t2\r\n3\t1\t2\r\n3\t1\t2\r\nTime taken: 0.045 seconds, Fetched 3 row(s)\r\n```\r\nReturns 3 rows based on the first parameter value.\r\n\r\n## How was this patch tested?\r\nAdded tests in GeneratorFunctionSuite, TypeCoercionSuite, SQLQueryTestSuite\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/386851508","html_url":"https://github.com/apache/spark/pull/21240#issuecomment-386851508","issue_url":"https://api.github.com/repos/apache/spark/issues/21240","id":386851508,"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-06T03:43:02Z","updated_at":"2018-05-06T03:43:02Z","author_association":"NONE","body":"**[Test build #90265 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/90265/testReport)** for PR 21240 at commit [`02ed058`](https://github.com/apache/spark/commit/02ed0582348f12473fdde8779c1d9e59ecfd84b1)."}}
{"actor":{"display_login":"SparkQA"}}