mirror of
https://github.com/apache/impala.git
synced 2026-01-07 00:02:28 -05:00
IMPALA-1392: Fix crash from UDFs that throw exceptions.
Change-Id: Ic8775d6344aba9655511f99c0a1760e8e148d0cf Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5243 Reviewed-by: Nong Li <nong@cloudera.com> Tested-by: jenkins
This commit is contained in:
@@ -99,3 +99,25 @@ int, int, int
|
||||
---- RESULTS
|
||||
10,20,30
|
||||
====
|
||||
---- QUERY
|
||||
# IMPALA-1392: Hive UDFs that throw exceptions should return NULL
|
||||
select udf_test.throws_exception();
|
||||
---- TYPES
|
||||
boolean
|
||||
---- RESULTS
|
||||
NULL
|
||||
====
|
||||
---- QUERY
|
||||
select udf_test.throws_exception() from functional.alltypestiny;
|
||||
---- TYPES
|
||||
boolean
|
||||
---- RESULTS
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
====
|
||||
|
||||
@@ -84,4 +84,8 @@ symbol='com.cloudera.impala.TestUdf';
|
||||
create function udf_test.identity(string, string, string) returns string
|
||||
location '/test-warehouse/impala-hive-udfs.jar'
|
||||
symbol='com.cloudera.impala.TestUdf';
|
||||
|
||||
create function udf_test.throws_exception() returns boolean
|
||||
location '/test-warehouse/impala-hive-udfs.jar'
|
||||
symbol='com.cloudera.impala.TestUdfException';
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user