Fang-Yu Rao has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/15689 )
Change subject: IMPALA-9625: Convert the name of a TAccessEvent to lowercase ...................................................................... IMPALA-9625: Convert the name of a TAccessEvent to lowercase 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 resolves the inconsistencies by converting the name of a TAccessEvent to lowercase in addAccessEvent(), which is called in getTable(). Testing: - Revised a FE test to verified we do not have duplicate ALTER events for the COMPUTE STATS statement. - Verified that the patch passes the exhaustive tests in the DEBUG build except for a flaky E2E test of test_column_storage_attributes. 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, 18 insertions(+), 4 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/89/15689/4 -- 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: newpatchset Gerrit-Change-Id: If0d9ba58da891921fafbfe7c6db358b51965e178 Gerrit-Change-Number: 15689 Gerrit-PatchSet: 4 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Norbert Luksa <[email protected]> Gerrit-Reviewer: Vincent Tran <[email protected]>
