impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharath Vissapragada (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4795: Allow fetching function obj from catalog using signature
Date Fri, 21 Jul 2017 21:36:46 GMT
Bharath Vissapragada has posted comments on this change.

Change subject: IMPALA-4795: Allow fetching function obj from catalog using signature
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/7479/1/fe/src/main/java/org/apache/impala/catalog/Catalog.java
File fe/src/main/java/org/apache/impala/catalog/Catalog.java:

PS1, Line 463: TFunction tfn = objectDesc.getFn();
             :         Function fn = null;
             :         if (tfn.isSetScalar_fn() || tfn.isSetAggregate_fn()) {
             :           Function desc = Function.fromThrift(tfn);
             :           fn = getFunction(desc, Function.CompareMode.IS_INDISTINGUISHABLE);
             :         } else if (tfn.isSetSignature()) {
             :           Db db = getDb(tfn.getName().getDb_name());
             :           fn = (db == null) ? null : db.getFunction(tfn.getSignature());
             :         }
nit: How about moving this to a new method, getFunction(TFunction fn, mode) and adding a method
doc that we look up by signature if scalar/agg fn is not set?


http://gerrit.cloudera.org:8080/#/c/7479/1/tests/webserver/test_web_pages.py
File tests/webserver/test_web_pages.py:

PS1, Line 148: input_url = self.CATALOG_OBJECT_URL.format("25000") + \
             :         "?object_type=FUNCTION&object_name=_impala_builtins.abs(BIGINT)"
             :     response = requests.get(input_url)
             :     assert response.status_code == requests.codes.ok \
             :            and
nit: I think you could use impalad.get_catalog_object_dump(..)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2cfad0213a79d39b77ad9aff701a93f93be4bf7f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Bikramjeet Vig <bikramjeet.vig@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message