impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Huaisi Xu (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) IMPALA-3687: Prefer Avro field name during schema reconciliation
Date Thu, 07 Jul 2016 22:25:31 GMT
Hello Bharath Vissapragada,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/3331

to look at the new patch set (#8).

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
---
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, 129 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/31/3331/8
-- 
To view, visit http://gerrit.cloudera.org:8080/3331
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia3e43b2885853c2b4f207a45a873c9d7f31379cd
Gerrit-PatchSet: 8
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Huaisi Xu <hxu@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Huaisi Xu <hxu@cloudera.com>
Gerrit-Reviewer: Juan Yu <jyu@cloudera.com>

Mime
View raw message