mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
In its current form, Impala supports Java UDFs that are derived from the UDF.class. The UDF.class is legacy code and Hive now supports implementation off of the GenericUDF.class. This rewrite will allow for easier extension to support GenericUDFs. Among added classes: UdfExecutor: The entry point class which is directly accessed by the backend. This is a wrapper class to the UDF class that will handle the evaluation of rows. HiveUdfExecutor: Abstract base class that contains code that is common to the legacy UDF.class and the GenericUDF.class when it is eventually created. HiveUdfExecutorLegacy: Implementation of the code that is UDF.class specific. HiveUdfLoader: Class responsible for using reflection to instantiate the UDF class HiveJavaFunction: Interface for retrieving objects pertaining to the UDF function class. HiveLegacyJavaFunction: Class representing the metadata for the legacy UDF class. Also added some functionality which captures the error when a user attempts to create a function and the function doesn't exist. The unit test checking this is the UDFRound function which no longer exists in hive-exec.jar so it is now in a load-java-udfs-fail.test test file. Change-Id: Idc9572e15fbed1876412159b99dddd3fb4d37174 Reviewed-on: http://gerrit.cloudera.org:8080/18020 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Csaba Ringhofer <csringhofer@cloudera.com> Tested-by: Csaba Ringhofer <csringhofer@cloudera.com>
10 lines
247 B
Plaintext
10 lines
247 B
Plaintext
====
|
|
---- QUERY
|
|
create function hive_round(double) returns double
|
|
location '$FILESYSTEM_PREFIX/test-warehouse/hive-exec.jar'
|
|
symbol='org.apache.hadoop.hive.ql.udf.UDFRound';
|
|
---- CATCH
|
|
org.apache.hadoop.hive.ql.udf.UDFRound not found in Jar
|
|
====
|
|
|