{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/5395","labels_url":"https://api.github.com/repos/apache/spark/issues/5395/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/5395/comments","events_url":"https://api.github.com/repos/apache/spark/issues/5395/events","html_url":"https://github.com/apache/spark/pull/5395","id":66941512,"number":5395,"title":"[SPARK-6747][SQL] Support List<> as a return type in Hive UDF","user":{"login":"maropu","id":692303,"avatar_url":"https://avatars.githubusercontent.com/u/692303?v=3","gravatar_id":"","url":"https://api.github.com/users/maropu","html_url":"https://github.com/maropu","followers_url":"https://api.github.com/users/maropu/followers","following_url":"https://api.github.com/users/maropu/following{/other_user}","gists_url":"https://api.github.com/users/maropu/gists{/gist_id}","starred_url":"https://api.github.com/users/maropu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maropu/subscriptions","organizations_url":"https://api.github.com/users/maropu/orgs","repos_url":"https://api.github.com/users/maropu/repos","events_url":"https://api.github.com/users/maropu/events{/privacy}","received_events_url":"https://api.github.com/users/maropu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-04-07T17:17:53Z","updated_at":"2015-04-14T17:09:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/5395","html_url":"https://github.com/apache/spark/pull/5395","diff_url":"https://github.com/apache/spark/pull/5395.diff","patch_url":"https://github.com/apache/spark/pull/5395.patch"},"body":"This patch supports List<> as a return type in Hive UDF.\r\n\r\nWe assume an UDF below;\r\npublic class UDFToListString extends UDF {\r\npublic List<String> evaluate(Object o)\r\n{ return Arrays.asList(\"xxx\", \"yyy\", \"zzz\"); }\r\n}\r\nAn exception of scala.MatchError is thrown as follows when the UDF used in the current implementation.\r\nscala.MatchError: interface java.util.List (of class java.lang.Class)\r\nat org.apache.spark.sql.hive.HiveInspectors$class.javaClassToDataType(HiveInspectors.scala:174)\r\nat org.apache.spark.sql.hive.HiveSimpleUdf.javaClassToDataType(hiveUdfs.scala:76)\r\nat org.apache.spark.sql.hive.HiveSimpleUdf.dataType$lzycompute(hiveUdfs.scala:106)\r\nat org.apache.spark.sql.hive.HiveSimpleUdf.dataType(hiveUdfs.scala:106)\r\nat org.apache.spark.sql.catalyst.expressions.Alias.toAttribute(namedExpressions.scala:131)\r\nat org.apache.spark.sql.catalyst.planning.PhysicalOperation$$anonfun$collectAliases$1.applyOrElse(patterns.scala:95)\r\nat org.apache.spark.sql.catalyst.planning.PhysicalOperation$$anonfun$collectAliases$1.applyOrElse(patterns.scala:94)\r\nat scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)\r\nat scala.collection.TraversableLike$$anonfun$collect$1.apply(TraversableLike.scala:278)\r\n..."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/92983310","html_url":"https://github.com/apache/spark/pull/5395#issuecomment-92983310","issue_url":"https://api.github.com/repos/apache/spark/issues/5395","id":92983310,"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-04-14T17:09:20Z","updated_at":"2015-04-14T17:09:20Z","body":"Test FAILed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/30253/\nTest FAILed."}}