[
https://issues.apache.org/jira/browse/HIVE-30211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HIVE-30211:
----------------------------------
Labels: pull-request-available (was: )
> Fix IllegalStateException in Calcite HiveFunctionHelper for GenericUDTF
> using StructObjectInspector
> ----------------------------------------------------------------------------------------------------
>
> Key: HIVE-30211
> URL: https://issues.apache.org/jira/browse/HIVE-30211
> Project: Hive
> Issue Type: Improvement
> Reporter: Raghav Aggarwal
> Assignee: Raghav Aggarwal
> Priority: Major
> Labels: pull-request-available
>
> GenericUDTF explicitly deprecates the array-based initialization method in
> favor of the struct-based overload:
> {code:java}
> public StructObjectInspector initialize(StructObjectInspector argOIs) throws
> UDFArgumentException {
> ...
> }
> @Deprecated
> public StructObjectInspector initialize(ObjectInspector[] argOIs) throws
> UDFArgumentException {
> throw new IllegalStateException("Should not be called directly");
> }
> {code}
> However, during Calcite query compilation,
> {{HiveFunctionHelper.getReturnType()}} directly calls the deprecated array
> overload, resulting in {{java.lang.IllegalStateException: Should not be
> called directly}}
>
> This bug forces all UDTF implementations to implement the deprecated method,
> which violates the API contract and creates issues for:
> 1. New native UDTFs (e.g., Iceberg snapshot lineage functions like
> iceberg_ancestors_of).
> 2. 3rd-party / custom user UDTFs (e.g., external jars loaded dynamically
> via ADD JAR in Beeline).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)