{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/21031","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/21031/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/21031/comments","events_url":"https://api.github.com/repos/apache/spark/issues/21031/events","html_url":"https://github.com/apache/spark/pull/21031","id":313008689,"number":21031,"title":"[SPARK-23923][SQL] Add cardinality function","user":{"login":"kiszk","id":1315079,"avatar_url":"https://avatars2.githubusercontent.com/u/1315079?v=4","gravatar_id":"","url":"https://api.github.com/users/kiszk","html_url":"https://github.com/kiszk","followers_url":"https://api.github.com/users/kiszk/followers","following_url":"https://api.github.com/users/kiszk/following{/other_user}","gists_url":"https://api.github.com/users/kiszk/gists{/gist_id}","starred_url":"https://api.github.com/users/kiszk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiszk/subscriptions","organizations_url":"https://api.github.com/users/kiszk/orgs","repos_url":"https://api.github.com/users/kiszk/repos","events_url":"https://api.github.com/users/kiszk/events{/privacy}","received_events_url":"https://api.github.com/users/kiszk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2018-04-10T16:56:51Z","updated_at":"2018-05-01T22:48:04Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/21031","html_url":"https://github.com/apache/spark/pull/21031","diff_url":"https://github.com/apache/spark/pull/21031.diff","patch_url":"https://github.com/apache/spark/pull/21031.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThe PR adds the SQL function `cardinality`. The behavior of the function is based on Presto's one.\r\n\r\nThe function returns the length of the array or map stored in the column as `int` while the Presto version returns the value as `BigInt` (`long` in Spark). The discussions regarding the difference of return type are [here](https://github.com/apache/spark/pull/21031#issuecomment-381284638) and [there](https://github.com/apache/spark/pull/21031#discussion_r181622107).\r\n\r\n## How was this patch tested?\r\n\r\nAdded UTs"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/385812940","html_url":"https://github.com/apache/spark/pull/21031#issuecomment-385812940","issue_url":"https://api.github.com/repos/apache/spark/issues/21031","id":385812940,"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-01T22:48:04Z","updated_at":"2018-05-01T22:48:04Z","author_association":"NONE","body":"**[Test build #90017 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/90017/testReport)** for PR 21031 at commit [`dd46bbf`](https://github.com/apache/spark/commit/dd46bbf0379a52cf18315b88e4be374e0d8b1956)."}}
{"actor":{"display_login":"SparkQA"}}