Sahil Takiar has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16188


Change subject: IMPALA-9478: Profiles should indicate if custom UDFs are being 
used
......................................................................

IMPALA-9478: Profiles should indicate if custom UDFs are being used

Adds a marker to runtime profiles and explain plans indicating if custom
(e.g. non-built in) user-defined functions are being used. For explain
plans, a SQL-style comment is added after any function call. For runtime
profiles, a new Frontend entry called "User Defined Functions (UDFs)"
lists out all UDFs analyzed during planning.

Take the following example:

create function hive_lower(string) returns string location
'/test-warehouse/hive-exec.jar'
symbol='org.apache.hadoop.hive.ql.udf.UDFLower';
set explain_level=3;
explain select * from functional.alltypes order by hive_lower(string_col);

  01:SORT
    order by: default.hive_lower(string_col) /* JAVA UDF */ ASC
    materialized: default.hive_lower(string_col) /* JAVA UDF */

This shows up in the runtime profile as well.

When the above query is actually run, the runtime profile includes the
following entry:

  Frontend
    User Defined Functions (UDFs): default.hive_lower, default.hive_lower

Testing:
* Will add tests after confirming approach

Change-Id: I79122e6cc74fd5a62c76962289a1615fbac2f345
---
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/main/java/org/apache/impala/service/FrontendProfile.java
2 files changed, 23 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/16188/1
--
To view, visit http://gerrit.cloudera.org:8080/16188
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I79122e6cc74fd5a62c76962289a1615fbac2f345
Gerrit-Change-Number: 16188
Gerrit-PatchSet: 1
Gerrit-Owner: Sahil Takiar <[email protected]>

Reply via email to