{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/22946","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/22946/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/22946/comments","events_url":"https://api.github.com/repos/apache/spark/issues/22946/events","html_url":"https://github.com/apache/spark/pull/22946","id":377341858,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MzA4Mzcz","number":22946,"title":"[SPARK-25943][SQL] Fail if mismatching nested struct fields when writing to datasource","user":{"login":"j-baker","id":42533,"node_id":"MDQ6VXNlcjQyNTMz","avatar_url":"https://avatars2.githubusercontent.com/u/42533?v=4","gravatar_id":"","url":"https://api.github.com/users/j-baker","html_url":"https://github.com/j-baker","followers_url":"https://api.github.com/users/j-baker/followers","following_url":"https://api.github.com/users/j-baker/following{/other_user}","gists_url":"https://api.github.com/users/j-baker/gists{/gist_id}","starred_url":"https://api.github.com/users/j-baker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-baker/subscriptions","organizations_url":"https://api.github.com/users/j-baker/orgs","repos_url":"https://api.github.com/users/j-baker/repos","events_url":"https://api.github.com/users/j-baker/events{/privacy}","received_events_url":"https://api.github.com/users/j-baker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-11-05T10:42:24Z","updated_at":"2018-11-15T03:44:22Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/22946","html_url":"https://github.com/apache/spark/pull/22946","diff_url":"https://github.com/apache/spark/pull/22946.diff","patch_url":"https://github.com/apache/spark/pull/22946.patch"},"body":"At present, Spark reorders mismatched columns when writing to\r\na datasource, but does not reorder nested structs.\r\n\r\nThis causes failure at present if the types do not match, but\r\nnot if the names do not match; this causes structs to get\r\nsilently mangled.\r\n\r\nIt's not obvious to me where I should add tests, so would\r\nappreciate guidance on that!\r\n\r\n## What changes were proposed in this pull request?\r\n\r\nUnify DatasourcesV1 behaviour with DatasourcesV2, by throwing if the names are mismatched.\r\n\r\n## How was this patch tested?\r\n\r\nNothing. I'd really appreciate a suggestion of where to put tests for this; I'm unfamiliar with the codebase and I couldn't find any obvious looking tests of that codepath."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/438906860","html_url":"https://github.com/apache/spark/pull/22946#issuecomment-438906860","issue_url":"https://api.github.com/repos/apache/spark/issues/22946","id":438906860,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODkwNjg2MA==","user":{"login":"SparkQA","id":8108735,"node_id":"MDQ6VXNlcjgxMDg3MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/8108735?v=4","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":"2018-11-15T03:44:22Z","updated_at":"2018-11-15T03:44:22Z","author_association":"NONE","body":"**[Test build #98852 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/98852/testReport)** for PR 22946 at commit [`417582d`](https://github.com/apache/spark/commit/417582d52af49d4a59e1085f205f2ddf99b900f6).\n * This patch **fails Spark unit tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}