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:
Nong Li
2014-11-13 11:06:09 -08:00
committed by ishaan
parent 41862f0d57
commit fa774bfb85
5 changed files with 121 additions and 53 deletions

View File

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

View File

@@ -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';
====