{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/4146","labels_url":"https://api.github.com/repos/apache/spark/issues/4146/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/4146/comments","events_url":"https://api.github.com/repos/apache/spark/issues/4146/events","html_url":"https://github.com/apache/spark/pull/4146","id":55087484,"number":4146,"title":"[SPARK-5361]python tuple not supported while converting PythonRDD back to JavaRDD","user":{"login":"wingchen","id":798321,"avatar_url":"https://avatars.githubusercontent.com/u/798321?v=3","gravatar_id":"","url":"https://api.github.com/users/wingchen","html_url":"https://github.com/wingchen","followers_url":"https://api.github.com/users/wingchen/followers","following_url":"https://api.github.com/users/wingchen/following{/other_user}","gists_url":"https://api.github.com/users/wingchen/gists{/gist_id}","starred_url":"https://api.github.com/users/wingchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingchen/subscriptions","organizations_url":"https://api.github.com/users/wingchen/orgs","repos_url":"https://api.github.com/users/wingchen/repos","events_url":"https://api.github.com/users/wingchen/events{/privacy}","received_events_url":"https://api.github.com/users/wingchen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-01-21T22:32:25Z","updated_at":"2015-01-22T00:46:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/4146","html_url":"https://github.com/apache/spark/pull/4146","diff_url":"https://github.com/apache/spark/pull/4146.diff","patch_url":"https://github.com/apache/spark/pull/4146.patch"},"body":"Existing `SerDeUtil.pythonToJava` implementation does not count in tuple cases: Pyrolite `python tuple` => `java Object[]`.\r\n\r\nSo with the following data:\r\n\r\n```\r\n[\r\n(u'2', {u'director': u'David Lean', u'genres': (u'Adventure', u'Biography', u'Drama'), u'title': u'Lawrence of Arabia', u'year': 1962}), \r\n(u'7', {u'director': u'Andrew Dominik', u'genres': (u'Biography', u'Crime', u'Drama'), u'title': u'The Assassination of Jesse James by the Coward Robert Ford', u'year': 2007})\r\n]\r\n```\r\n\r\nExceptions happen at the `genres` part:\r\n\r\n```\r\n15/01/16 10:28:31 ERROR Executor: Exception in task 0.0 in stage 3.0 (TID 7)\r\njava.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.ArrayList\r\n\tat org.apache.spark.api.python.SerDeUtil$$anonfun$pythonToJava$1$$anonfun$apply$1.apply(SerDeUtil.scala:157)\r\n\tat org.apache.spark.api.python.SerDeUtil$$anonfun$pythonToJava$1$$anonfun$apply$1.apply(SerDeUtil.scala:153)\r\n\tat scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371)\r\n\tat scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:308)\r\n```\r\n\r\nThis pull request adds in tuple handling both in `SerDeUtil.pythonToJava` and `JavaToWritableConverter.convertToWritable`."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/70951851","html_url":"https://github.com/apache/spark/pull/4146#issuecomment-70951851","issue_url":"https://api.github.com/repos/apache/spark/issues/4146","id":70951851,"user":{"login":"wingchen","id":798321,"avatar_url":"https://avatars.githubusercontent.com/u/798321?v=3","gravatar_id":"","url":"https://api.github.com/users/wingchen","html_url":"https://github.com/wingchen","followers_url":"https://api.github.com/users/wingchen/followers","following_url":"https://api.github.com/users/wingchen/following{/other_user}","gists_url":"https://api.github.com/users/wingchen/gists{/gist_id}","starred_url":"https://api.github.com/users/wingchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingchen/subscriptions","organizations_url":"https://api.github.com/users/wingchen/orgs","repos_url":"https://api.github.com/users/wingchen/repos","events_url":"https://api.github.com/users/wingchen/events{/privacy}","received_events_url":"https://api.github.com/users/wingchen/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T00:46:02Z","updated_at":"2015-01-22T00:46:02Z","body":"@JoshRosen Sure thing. I did not see any similar regression test case in this file though.\r\nIs there any convention to follow? Or will I just create a test class called `Regression_5361` or `Spark_5361`?\r\n\r\nThanks"}}