{"action":"created","issue":{"url":"https://api.github.com/repos/apache/parquet-mr/issues/315","labels_url":"https://api.github.com/repos/apache/parquet-mr/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/apache/parquet-mr/issues/315/comments","events_url":"https://api.github.com/repos/apache/parquet-mr/issues/315/events","html_url":"https://github.com/apache/parquet-mr/pull/315","id":129298903,"number":315,"title":"[PARQUET-385][PARQUET-379] Fixes strict schema merging","user":{"login":"liancheng","id":230655,"avatar_url":"https://avatars.githubusercontent.com/u/230655?v=3","gravatar_id":"","url":"https://api.github.com/users/liancheng","html_url":"https://github.com/liancheng","followers_url":"https://api.github.com/users/liancheng/followers","following_url":"https://api.github.com/users/liancheng/following{/other_user}","gists_url":"https://api.github.com/users/liancheng/gists{/gist_id}","starred_url":"https://api.github.com/users/liancheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liancheng/subscriptions","organizations_url":"https://api.github.com/users/liancheng/orgs","repos_url":"https://api.github.com/users/liancheng/repos","events_url":"https://api.github.com/users/liancheng/events{/privacy}","received_events_url":"https://api.github.com/users/liancheng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T23:10:40Z","updated_at":"2016-01-27T23:14:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/parquet-mr/pulls/315","html_url":"https://github.com/apache/parquet-mr/pull/315","diff_url":"https://github.com/apache/parquet-mr/pull/315.diff","patch_url":"https://github.com/apache/parquet-mr/pull/315.patch"},"body":"This PR fixes strict mode schema merging. To merge two `PrimitiveType` `t1` and `t2`, they must satisfy the following conditions:\r\n\r\n1. `t1` and `t2` have the same primitive type name\r\n1. `t1` and `t2` either\r\n   - don't have original type, or\r\n   - have the same original type\r\n1. If `t1` and `t2` are both `FIXED_LEN_BYTE_ARRAY`, they should have the same length\r\n\r\nAlso, merged schema now preserves original name if there's any."},"comment":{"url":"https://api.github.com/repos/apache/parquet-mr/issues/comments/175906655","html_url":"https://github.com/apache/parquet-mr/pull/315#issuecomment-175906655","issue_url":"https://api.github.com/repos/apache/parquet-mr/issues/315","id":175906655,"user":{"login":"liancheng","id":230655,"avatar_url":"https://avatars.githubusercontent.com/u/230655?v=3","gravatar_id":"","url":"https://api.github.com/users/liancheng","html_url":"https://github.com/liancheng","followers_url":"https://api.github.com/users/liancheng/followers","following_url":"https://api.github.com/users/liancheng/following{/other_user}","gists_url":"https://api.github.com/users/liancheng/gists{/gist_id}","starred_url":"https://api.github.com/users/liancheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liancheng/subscriptions","organizations_url":"https://api.github.com/users/liancheng/orgs","repos_url":"https://api.github.com/users/liancheng/repos","events_url":"https://api.github.com/users/liancheng/events{/privacy}","received_events_url":"https://api.github.com/users/liancheng/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T23:14:31Z","updated_at":"2016-01-27T23:14:31Z","body":"Not quite sure whether we should also deprecate the `strict` argument of `MessageType.union`. I tend to do so since Parquet itself never uses non-strict schema merging internally. Also, non-strict schema merging doesn't make sense and may lead to wrong query result as discussed in [PARQUET-379][1].\r\n\r\n[1]: https://issues.apache.org/jira/browse/PARQUET-379?focusedCommentId=14933630&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14933630"}}