Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-11549

Incorrent return type mismatch in Hive generic UDFs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 4.2.0
    • Impala 4.3.0
    • Frontend
    • 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

          Activity

            People

              csringhofer Csaba Ringhofer
              csringhofer Csaba Ringhofer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: