Alex Behm has posted comments on this change.

Change subject: IMPALA-5259: Add REFRESH FUNCTIONS <db> statement
......................................................................


Patch Set 2:

(9 comments)

Looks pretty good to me. I agree with Bharath's comments.

http://gerrit.cloudera.org:8080/#/c/6878/2/fe/src/main/java/org/apache/impala/analysis/ResetMetadataStmt.java
File fe/src/main/java/org/apache/impala/analysis/ResetMetadataStmt.java:

Line 64:   public static ResetMetadataStmt createInvalidateStmt(TableName 
tableName) {
Much better, thanks!


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

Line 622:       org.apache.hadoop.hive.metastore.api.Database msDb =
// Contains native functions in its params map.


PS2, Line 639: "Database '" + dbName + "' not found")
> May be use  the template DB_DOES_NOT_EXIST_ERROR_MSG for consistency. Also 
Also move the try below this, otherwise you will just catch and swallow it.


Line 655:       // was dropped and a different function with the same name and 
signature was
Mention what could be different about this new function from the HMS, e.g., the 
binary.


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

Line 258:         removeFunction(Function.fromThrift(catalogObject.getFn()));
It's wrong to unconditionally remove the function here because the 
catalogObject could have a version smaller than the existing function. Use 
removeFunction(TFunction thriftFn, long dropCatalogVersion) instead.


http://gerrit.cloudera.org:8080/#/c/6878/2/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
File fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java:

Line 3095:       // If Db_name is set, this is a "refresh functions" operation.
Shrink to: This is a "refresh functions" operation.

(it's clear that Db_name is set from the code)


http://gerrit.cloudera.org:8080/#/c/6878/2/tests/custom_cluster/test_permanent_udfs.py
File tests/custom_cluster/test_permanent_udfs.py:

Line 243:       assert len(glob.glob(self.LOCAL_LIBRARY_DIR + "/*.jar")) == 0
Add this to the bottom of your new tests as well


Line 254:     by setting DBPROPERTIES of a database.'''
Nice!


Line 333:     # Drop the original function and create a different function with 
the same name
... but a different jar as the original.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3625c88bb51cca833f3293c224d3f0feb00e6e0b
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Taras Bobrovytsky <tbobrovyt...@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tbobrovyt...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to