Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/11928 )
Change subject: IMPALA-7839: Remove code duplication for getting a unique catalog object name ...................................................................... Patch Set 1: Code-Review+1 (2 comments) lgtm + I left some ideas. http://gerrit.cloudera.org:8080/#/c/11928/1/fe/src/main/java/org/apache/impala/catalog/CatalogObjectImpl.java File fe/src/main/java/org/apache/impala/catalog/CatalogObjectImpl.java: http://gerrit.cloudera.org:8080/#/c/11928/1/fe/src/main/java/org/apache/impala/catalog/CatalogObjectImpl.java@44 PS1, Line 44: public String getUniqueName() { return Catalog.toCatalogObjectKey(toTCatalogObject()); } Does any subclass overrides this? If not, then it could be 'final'. http://gerrit.cloudera.org:8080/#/c/11928/1/fe/src/main/java/org/apache/impala/catalog/Db.java File fe/src/main/java/org/apache/impala/catalog/Db.java: http://gerrit.cloudera.org:8080/#/c/11928/1/fe/src/main/java/org/apache/impala/catalog/Db.java@439 PS1, Line 439: catalogObj.setDb(toThrift()); +1 idea to remove code duplication: as toTCatalogObject() implementations seem identical with the exception of setting different properties, the catalogObj.set* part could be moved to a function like writeToTCatalogObject, while the rest of toTCatalogObject() could be moved to CatalogObjectImpl. -- To view, visit http://gerrit.cloudera.org:8080/11928 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8218e57210c06fe6f2578a792d518e4b0287f15f Gerrit-Change-Number: 11928 Gerrit-PatchSet: 1 Gerrit-Owner: Fredy Wijaya <fwij...@cloudera.com> Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Fredy Wijaya <fwij...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Comment-Date: Tue, 20 Nov 2018 15:50:34 +0000 Gerrit-HasComments: Yes