mirror of
https://github.com/apache/impala.git
synced 2026-02-01 03:00:22 -05:00
IMPALA-12565: Fix crash triggered by calling pmod() UDF
When the pmod() UDF is called, if the divisor is 0, it will cause the impalad to crash. In this case, the result of the pmod() UDF should be NULL. Tests: * add a test in exprs.test Change-Id: Idcc274564a4b5b0872eb0c0c882c2f15e3247785 Reviewed-on: http://gerrit.cloudera.org:8080/20709 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
committed by
Impala Public Jenkins
parent
19d2425bb0
commit
ea86aef2f1
@@ -3286,4 +3286,12 @@ select bytes(string_col), bytes(date_string_col) from functional.alltypestiny;
|
||||
1,8
|
||||
---- TYPES
|
||||
INT, INT
|
||||
====
|
||||
---- QUERY
|
||||
# Test for IMPALA-12565 (UDF)
|
||||
select pmod(0, 0), pmod(0, 0.0);
|
||||
---- RESULTS
|
||||
NULL,NULL
|
||||
---- TYPES
|
||||
BIGINT, DOUBLE
|
||||
====
|
||||
Reference in New Issue
Block a user