[
https://issues.apache.org/jira/browse/HIVE-30211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Raghav Aggarwal updated HIVE-30211:
-----------------------------------
Description:
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}}
> 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
>
> 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 message was sent by Atlassian Jira
(v10.3.26#10030026)