hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mykhailo Kysliuk (JIRA)" <>
Subject [jira] [Commented] (HIVE-20351) GenericUDFNamedStruct should constant fold at compile time
Date Fri, 17 Aug 2018 14:25:00 GMT


Mykhailo Kysliuk commented on HIVE-20351:

When we run query 
select x, to_json(named_struct('Total', 1.0)), named_struct('Total', 1.0) from test order
by x;
We are getting the next error:
FAILED: SemanticException [Error 10014]: Line 1:10 Wrong arguments '1.0': Don't know how to
handle object inspector org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableConstantHiveDecimalObjectInspector@35d4fecf
This happens at to_json function(with and without fix). If we put integer value at parameters
everything works fine.
Single named_struct UDF works fine with all of argument types. No errors at logs anymore.

> GenericUDFNamedStruct should constant fold at compile time
> ----------------------------------------------------------
>                 Key: HIVE-20351
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Mykhailo Kysliuk
>            Assignee: Mykhailo Kysliuk
>            Priority: Minor
>         Attachments: HIVE-20351.1.patch, HIVE-20351.2.patch, HIVE-20351.3.patch, HIVE-20351.4.patch
> Reproduced at hive-3.0.
> When we run hive query:
> {code:java}
> select named_struct('Total','Total') from test;
> {code}
> We could see the ERROR at hiveserver logs:
> {code:java}
> 2018-05-25T15:18:13,182 ERROR [main] optimizer.ConstantPropagateProcFactory: Unable to
evaluate org.apache.hadoop.hive.ql.udf.generic.GenericUDFNamedStruct@a0bf272. Return value
> {code}
> This error is harmless because all results are correct. But named_struct constant values
should be processed correctly.

This message was sent by Atlassian JIRA

View raw message