File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -8788,20 +8788,22 @@ public GetFunctionsResponse get_functions_req(GetFunctionsRequest req)
87888788
87898789 RawStore ms = getMS ();
87908790 Exception ex = null ;
8791- List < Function > funcs = null ;
8791+ GetFunctionsResponse response = new GetFunctionsResponse () ;
87928792 String catName = req .isSetCatalogName () ? req .getCatalogName () : getDefaultCatalog (conf );
87938793 try {
8794- funcs = ms .getFunctionsRequest (catName , req .getDbName (),
8794+ List result = ms .getFunctionsRequest (catName , req .getDbName (),
87958795 req .getPattern (), req .isReturnNames ());
8796+ if (req .isReturnNames ()) {
8797+ response .setFunction_names (result );
8798+ } else {
8799+ response .setFunctions (result );
8800+ }
87968801 } catch (Exception e ) {
87978802 ex = e ;
87988803 throw newMetaException (e );
87998804 } finally {
8800- endFunction ("get_functions" , funcs != null , ex );
8805+ endFunction ("get_functions" , ex != null , ex );
88018806 }
8802- GetFunctionsResponse response = new GetFunctionsResponse ();
8803- response .setFunctions (funcs );
8804-
88058807 return response ;
88068808 }
88078809
You can’t perform that action at this time.
0 commit comments