Bharath Vissapragada has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13904 )

Change subject: IMPALA-8434: retain tables and functions in altering database
......................................................................


Patch Set 2: Code-Review+2

(2 comments)

http://gerrit.cloudera.org:8080/#/c/13904/2/fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java
File fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java:

http://gerrit.cloudera.org:8080/#/c/13904/2/fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java@394
PS2, Line 394:  CatalogObjectVersionSet.INSTANCE.updateVersions(
             :             existingDb.getCatalogVersion(), catalogVersion);
             :         
CatalogObjectVersionSet.INSTANCE.removeAll(existingDb.getTables());
             :         CatalogObjectVersionSet.INSTANCE.removeAll(
             :             existingDb.getFunctions(null, new PatternMatcher()));
             :         // IMPALA-8434: add back the existing tables/functions. 
Note that their version
             :         // counters in CatalogObjectVersionSet have been 
decreased by the above removeAll
             :         // statements, meaning their references from the old db 
are deleted since the old
             :         // db object has been replaced by newDb.
             :         for (Table tbl: existingDb.getTables()) {
             :           newDb.addTable(tbl);
             :         }
> Db.addTable and Db.addFunction will finally add back the versions to Catalo
Oops I only went one level deep and checked  tableCache_.add(table); Didn't 
realize that it was updating the CatalogObjectVersionSet underneath. Sorry for 
the false alarm.


http://gerrit.cloudera.org:8080/#/c/13904/2/tests/metadata/test_ddl.py
File tests/metadata/test_ddl.py:

http://gerrit.cloudera.org:8080/#/c/13904/2/tests/metadata/test_ddl.py@241
PS2, Line 241:     self.client.execute("create table {0}.tbl (i 
int)".format(unique_database))
nit: how about merging this with the above test?



--
To view, visit http://gerrit.cloudera.org:8080/13904
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3dc9857fd2733e20cf10fbe17bb1a4670d7d015
Gerrit-Change-Number: 13904
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Vihang Karajgaonkar <[email protected]>
Gerrit-Comment-Date: Thu, 25 Jul 2019 17:44:52 +0000
Gerrit-HasComments: Yes

Reply via email to