Thomas Tauber-Marshall has uploaded a new patch set (#2). Change subject: IMPALA-5286: Kudu column name case cleanup ......................................................................
IMPALA-5286: 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 fixes several issues: - KuduColumn now converts its name to all lower case so that general code can retrieve the name with getName() in Impala case, which fixes a problem where the Analyzer would create two SlotDescriptors that point to the same column because registerSlotRef() was being called with inconsistent casing when ordering on the column. It also exposes a getKuduName() that returns the name in Kudu casing, for use by Kudu specific code. - KuduPartitionParam stores column names in Kudu case now, to fix an issue with 'ADD RANGE PARTITION'. - Previously, 'ALTER TABLE DROP COLUMN' and 'ALTER TABLE CHANGE' required the column name to be specified in the Kudu casing. This patch allows the column name to be specified in any casing. Testing: - Added an e2e test in test_kudu.py. - 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/cup/sql-parser.cup M fe/src/main/java/org/apache/impala/analysis/Analyzer.java M fe/src/main/java/org/apache/impala/analysis/KuduPartitionParam.java M fe/src/main/java/org/apache/impala/catalog/Column.java M fe/src/main/java/org/apache/impala/catalog/KuduColumn.java M fe/src/main/java/org/apache/impala/catalog/KuduTable.java M fe/src/main/java/org/apache/impala/planner/KuduScanNode.java M fe/src/main/java/org/apache/impala/service/KuduCatalogOpExecutor.java M fe/src/main/java/org/apache/impala/util/KuduUtil.java M tests/query_test/test_kudu.py 11 files changed, 97 insertions(+), 21 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/6902/2 -- To view, visit http://gerrit.cloudera.org:8080/6902 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I14aba88510012174716691b9946e1c7d54d01b44 Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Thomas Tauber-Marshall <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Matthew Jacobs <[email protected]> Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]>
