{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/22708","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/22708/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/22708/comments","events_url":"https://api.github.com/repos/apache/spark/issues/22708/events","html_url":"https://github.com/apache/spark/pull/22708","id":369520828,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNDQyNzc3","number":22708,"title":"[SPARK-21402][SQL] Fix java array of structs deserialization","user":{"login":"vofque","id":22717198,"node_id":"MDQ6VXNlcjIyNzE3MTk4","avatar_url":"https://avatars0.githubusercontent.com/u/22717198?v=4","gravatar_id":"","url":"https://api.github.com/users/vofque","html_url":"https://github.com/vofque","followers_url":"https://api.github.com/users/vofque/followers","following_url":"https://api.github.com/users/vofque/following{/other_user}","gists_url":"https://api.github.com/users/vofque/gists{/gist_id}","starred_url":"https://api.github.com/users/vofque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vofque/subscriptions","organizations_url":"https://api.github.com/users/vofque/orgs","repos_url":"https://api.github.com/users/vofque/repos","events_url":"https://api.github.com/users/vofque/events{/privacy}","received_events_url":"https://api.github.com/users/vofque/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-10-12T11:58:33Z","updated_at":"2018-10-16T15:06:54Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/22708","html_url":"https://github.com/apache/spark/pull/22708","diff_url":"https://github.com/apache/spark/pull/22708.diff","patch_url":"https://github.com/apache/spark/pull/22708.patch"},"body":"When deserializing values of ArrayType with struct elements in java beans, fields of structs get mixed up. \r\nI suggest using struct data types retrieved from resolved input data instead of inferring them from java beans.\r\n\r\n## What changes were proposed in this pull request?\r\n\r\nMapObjects expression is used to map array elements to java beans. Struct type of elements is inferred from java bean structure and ends up with mixed up field order.\r\nI used UnresolvedMapObjects instead of MapObjects, which allows to provide element type for MapObjects during analysis based on the resolved input data, not on the java bean.\r\n\r\n## How was this patch tested?\r\n\r\nAdded a test case.\r\nBuilt complete project on travis.\r\n\r\n@michalsenkyr @cloud-fan @marmbrus @liancheng "},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/430274635","html_url":"https://github.com/apache/spark/pull/22708#issuecomment-430274635","issue_url":"https://api.github.com/repos/apache/spark/issues/22708","id":430274635,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDI3NDYzNQ==","user":{"login":"AmplabJenkins","id":4031291,"node_id":"MDQ6VXNlcjQwMzEyOTE=","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-10-16T15:06:54Z","updated_at":"2018-10-16T15:06:54Z","author_association":"NONE","body":"Test FAILed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97454/\nTest FAILed."}}
{"actor":{"display_login":"AmplabJenkins"}}