Fang-Yu Rao has uploaded this change for review. ( http://gerrit.cloudera.org:8080/15689
Change subject: IMPALA-9625: Convert fully-qualified table name to lowercase in getTable() ...................................................................... IMPALA-9625: Convert fully-qualified table name to lowercase in getTable() Impala's COMPUTE STATS statement results in two registrations of the ALTER event for the corresponding table identified by its fully-qualified table name and a Set is used to maintained the audits. The first registration is in Analyzer#registerAuthAndAuditEvent() and the second is in Analyzer#getTable(). In registerAuthAndAuditEvent(), the corresponding full table name table.getFullName() is produced by a call to Analyzer#resolveTableRef(). The resulting database and table names are both in lowercase. However, in getTable(), the fully-qualified table name is produced by a call to Analyzer#getFqTableName(). The resulting database and table names are in their originally unconverted form provided by the user from the Impala shell. Hence, there is no guarantee that the database and table names are both in lowercase. Therefore, if a user does not provide lowercase database and table names, the returned full table names from registerAuthAndAuditEvent() and getTable() would differ, resulting in duplicate ALTER events for the same table. This patch fixes the inconsistencies by converting the fully-qualified table name to lowercase in getTable(). Testing: - Revised a FE test to verified we do not have duplicate ALTER events for the COMPUTE STATS statement. Change-Id: If0d9ba58da891921fafbfe7c6db358b51965e178 --- M fe/src/main/java/org/apache/impala/analysis/Analyzer.java M fe/src/test/java/org/apache/impala/analysis/AuditingTest.java 2 files changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/89/15689/1 -- To view, visit http://gerrit.cloudera.org:8080/15689 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If0d9ba58da891921fafbfe7c6db358b51965e178 Gerrit-Change-Number: 15689 Gerrit-PatchSet: 1 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Norbert Luksa <[email protected]>
