Internal Jenkins has submitted this change and it was merged. Change subject: IMPALA-3687: Prefer Avro field name during schema reconciliation ......................................................................
IMPALA-3687: Prefer Avro field name during schema reconciliation Since it is possible to create an Avro table with both column definitions and an Avro schema, Impala attempts to reconcile inconsistencies in the two schema definitions, generally preferring the Avro schema. The only exception to this rule was with CHAR/VARCHAR/STRING columns, where the column definition was preferred in order to support tables with CHAR/VARCHAR columns although Avro only supports STRING. This exception is confusing because the name for such a column will be taken from the column definition (and not from the Avro schema). This patch prefers name, comment from Avro schema definition and uses column type from column definition for CHAR/VARCHAR/STRING columns. Change-Id: Ia3e43b2885853c2b4f207a45a873c9d7f31379cd Reviewed-on: http://gerrit.cloudera.org:8080/3331 Reviewed-by: Huaisi Xu <[email protected]> Tested-by: Internal Jenkins --- M fe/src/main/java/com/cloudera/impala/util/AvroSchemaConverter.java M fe/src/main/java/com/cloudera/impala/util/AvroSchemaUtils.java M testdata/workloads/functional-query/queries/QueryTest/avro-schema-changes.test M testdata/workloads/functional-query/queries/QueryTest/avro-schema-resolution.test M tests/query_test/test_avro_schema_resolution.py 5 files changed, 131 insertions(+), 17 deletions(-) Approvals: Huaisi Xu: Looks good to me, approved Internal Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/3331 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3e43b2885853c2b4f207a45a873c9d7f31379cd Gerrit-PatchSet: 14 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Huaisi Xu <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Bharath Vissapragada <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]> Gerrit-Reviewer: Huaisi Xu <[email protected]> Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Juan Yu <[email protected]>
