impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Tauber-Marshall (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5286/IMPALA-5283: Kudu column name case cleanup
Date Fri, 16 Jun 2017 21:16:48 GMT
Hello Alex Behm,

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

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

Change subject: IMPALA-5286/IMPALA-5283: Kudu column name case cleanup

IMPALA-5286/IMPALA-5283: Kudu column name case cleanup

Impala is case insensitive for column names and generally deals
with them in all lower case. Kudu is case sensitive. This can
lead to a problems when a table is created externally in Kudu
with a column name with upper case letters.

This patch solves the problem by having KuduColumn always store
its name in lower case, so that general Impala code that has been
written expecting lower cased column names can use Column.getName()

It also adds the method KuduColumn.getKuduName(), which returns
the column name in the case that it appears in Kudu. Any code that
passes column names into the Kudu API must call this method first
to get the correct column name.

There are four specific situations fixed by this patch:
- When ordering on a Kudu column, the Analyzer would create
  two SlotDescriptors that point to the same column because
  registerSlotRef() was being called with inconsistent casing.
  It is now always called with the lower cased names.
- 'ADD RANGE PARTITION' would fail to find the range partition
  column if it isn't all lower case in Kudu.
  if the column name was specified in Kudu case.
- 'CREATE EXTERNAL TABLE' called on a Kudu table with column names
  that differ only in case now returns an error, since Impala has
  no way of handling this situation.

- Added e2e tests in
- Manually edited functional_kudu to change column names to have
  mixed casing and ran the kudu tests.

Change-Id: I14aba88510012174716691b9946e1c7d54d01b44
M common/thrift/CatalogObjects.thrift
M fe/src/main/java/org/apache/impala/analysis/
M fe/src/main/java/org/apache/impala/analysis/
M fe/src/main/java/org/apache/impala/catalog/
M fe/src/main/java/org/apache/impala/catalog/
M fe/src/main/java/org/apache/impala/planner/
M fe/src/main/java/org/apache/impala/service/
M fe/src/main/java/org/apache/impala/util/
M tests/query_test/
9 files changed, 122 insertions(+), 14 deletions(-)

  git pull ssh:// refs/changes/02/6902/5
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I14aba88510012174716691b9946e1c7d54d01b44
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>

View raw message