Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 4.2.0
-
None
-
ghx-label-4
Description
The valid looking function creation returned an error:
CREATE FUNCTION IF NOT EXISTS st_bin(bigint, binary) returns bigint LOCATION ' ...' SYMBOL='org.apache.hadoop.hive.ql.udf.esri.ST_Bin';
ERROR: CatalogException: Error retrieving class class org.apache.hadoop.hive.ql.udf.esri.ST_Bin: Function expected return type bigint but was created with BIGINT
I think that issue is that we use =! to check for mismatch:
https://github.com/apache/impala/blob/fec7a79c50de9ef5db2c652ece111aaa303d57c7/fe/src/main/java/org/apache/impala/hive/executor/HiveGenericJavaFunction.java#L149
Comparison of ObjectInspectors should be done in a more complex way, see
https://github.com/apache/hive/blob/d06957f254e026e719f30027d161264be43386b0/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java#L1325
Attachments
Issue Links
- blocks
-
IMPALA-11745 Add Hive's ESRI geospatial functions as builtins
- Resolved
- relates to
-
IMPALA-11162 Provide support for Hive Generic UDFs
- Resolved