{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/6222","labels_url":"https://api.github.com/repos/apache/spark/issues/6222/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/6222/comments","events_url":"https://api.github.com/repos/apache/spark/issues/6222/events","html_url":"https://github.com/apache/spark/pull/6222","id":77426379,"number":6222,"title":"[SPARK-7691] [WIP] Refactor CatalystTypeConverter to use type-specific row accessors","user":{"login":"JoshRosen","id":50748,"avatar_url":"https://avatars.githubusercontent.com/u/50748?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshRosen","html_url":"https://github.com/JoshRosen","followers_url":"https://api.github.com/users/JoshRosen/followers","following_url":"https://api.github.com/users/JoshRosen/following{/other_user}","gists_url":"https://api.github.com/users/JoshRosen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshRosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshRosen/subscriptions","organizations_url":"https://api.github.com/users/JoshRosen/orgs","repos_url":"https://api.github.com/users/JoshRosen/repos","events_url":"https://api.github.com/users/JoshRosen/events{/privacy}","received_events_url":"https://api.github.com/users/JoshRosen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-17T23:27:17Z","updated_at":"2015-05-17T23:34:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/6222","html_url":"https://github.com/apache/spark/pull/6222","diff_url":"https://github.com/apache/spark/pull/6222.diff","patch_url":"https://github.com/apache/spark/pull/6222.patch"},"body":"This patch significantly refactors CatalystTypeConverters to both clean up the code and enable these conversions to work with future Project Tungsten features.\r\n\r\nAt a high level, I've reorganized the code so that all functions dealing with the same type are grouped together into type-specific subclasses of `CatalystTypeConveter`.  In addition, I've added new methods that allow the Catalyst Row -> Scala Row conversions to access the Catalyst row's fields through type-specific `getTYPE()` methods rather than the generic `get()` / `Row.apply` methods.  This refactoring is a blocker to being able to unit test new operators that I'm developing as part of Project Tungsten, since those operators may output `UnsafeRow` instances which don't support the generic `get()`.\r\n\r\nThe stricter type usage of types here has uncovered some bugs in other parts of Spark SQL:\r\n\r\n- #6217: DescribeCommand is assigned wrong output attributes in SparkStrategies\r\n- #6218: DataFrame.describe() should cast all aggregates to doubles\r\n\r\nOnce those PRs are merged, I'll rebase this patch and remove the `[WIP]` tag."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/102870552","html_url":"https://github.com/apache/spark/pull/6222#issuecomment-102870552","issue_url":"https://api.github.com/repos/apache/spark/issues/6222","id":102870552,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","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":"2015-05-17T23:34:50Z","updated_at":"2015-05-17T23:34:50Z","body":"  [Test build #32952 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32952/consoleFull) for   PR 6222 at commit [`93314c5`](https://github.com/apache/spark/commit/93314c51124e357d230b95e7e82faa7989bcae28)."}}