{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/20625","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/20625/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/20625/comments","events_url":"https://api.github.com/repos/apache/spark/issues/20625/events","html_url":"https://github.com/apache/spark/pull/20625","id":297704520,"number":20625,"title":"[SPARK-23446][PYTHON] Explicitly check supported types in toPandas","user":{"login":"HyukjinKwon","id":6477701,"avatar_url":"https://avatars0.githubusercontent.com/u/6477701?v=4","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-16T07:51:39Z","updated_at":"2018-02-16T08:02:30Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/20625","html_url":"https://github.com/apache/spark/pull/20625","diff_url":"https://github.com/apache/spark/pull/20625.diff","patch_url":"https://github.com/apache/spark/pull/20625.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis PR explicitly specifies and checks the types we supported in `toPandas`. This was a hole. For example, we haven't finished the binary type support in Python side yet but now it allows as below:\r\n\r\n```python\r\nspark.conf.set(\"spark.sql.execution.arrow.enabled\", \"false\")\r\ndf = spark.createDataFrame([[bytearray(\"a\")]])\r\ndf.toPandas()\r\nspark.conf.set(\"spark.sql.execution.arrow.enabled\", \"true\")\r\ndf.toPandas()\r\n```\r\n\r\n```\r\n     _1\r\n0  [97]\r\n  _1\r\n0  a\r\n```\r\n\r\nThis should be disallowed. I think the same things also apply to nested timestamps too.\r\n\r\nI also added some nicer message about `spark.sql.execution.arrow.enabled` in the error message.\r\n\r\n## How was this patch tested?\r\n\r\nManually tested and tests added in `python/pyspark/sql/tests.py`."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/366167826","html_url":"https://github.com/apache/spark/pull/20625#issuecomment-366167826","issue_url":"https://api.github.com/repos/apache/spark/issues/20625","id":366167826,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars3.githubusercontent.com/u/4031291?v=4","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":"2018-02-16T08:02:30Z","updated_at":"2018-02-16T08:02:30Z","author_association":"NONE","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/932/\nTest PASSed."}}
{"actor":{"display_login":"AmplabJenkins"}}