Files
impala/testdata/workloads/functional-query/queries/QueryTest/load-java-udfs-fail.test
Steve Carlin 4734a681f3 IMPALA-10997: Refactor Java Hive UDF code.
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>
2022-02-03 09:13:21 +00:00

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
====