You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Csaba Ringhofer (Jira)" <ji...@apache.org> on 2022/09/01 16:35:00 UTC

[jira] [Commented] (IMPALA-11549) Incorrent return type mismatch in Hive generic UDFs

    [ https://issues.apache.org/jira/browse/IMPALA-11549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17599062#comment-17599062 ] 

Csaba Ringhofer commented on IMPALA-11549:
------------------------------------------

I have realized that this a more complex issue than type matching - while the SQL types do match, the inspector /  values types are different:
we expect WritableLongObjectInspector based on the SQL type, but the UDF actually returns JavaLongObjectInspector

> Incorrent return type mismatch in Hive generic UDFs
> ---------------------------------------------------
>
>                 Key: IMPALA-11549
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11549
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.2.0
>            Reporter: Csaba Ringhofer
>            Priority: Major
>
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org