hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Zadoroshnyak (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-13951) GenericUDFArray should constant fold at compile time
Date Wed, 29 Jun 2016 09:53:38 GMT

     [ https://issues.apache.org/jira/browse/HIVE-13951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Zadoroshnyak updated HIVE-13951:
---------------------------------------
    Assignee: Gopal V

> GenericUDFArray should constant fold at compile time
> ----------------------------------------------------
>
>                 Key: HIVE-13951
>                 URL: https://issues.apache.org/jira/browse/HIVE-13951
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 1.3.0, 2.1.0
>            Reporter: Sergey Zadoroshnyak
>            Assignee: Gopal V
>            Priority: Critical
>
> 1. Hive constant propagation optimizer is enabled.  hive.optimize.constant.propagation=true;
> 2. Hive query: 
> select array('Total','Total') from some_table;
> ERROR: org.apache.hadoop.hive.ql.optimizer.ConstantPropagateProcFactory (ConstantPropagateProcFactory.java:evaluateFunction(939))
- Unable to evaluate org.apache.hadoop.hive.ql.udf.generic.GenericUDFArray@3d26c423. Return
value unrecoginizable.
> Details:
> During compilation of query, hive checks if any subexpression of a specified expression
can be evaluated to be constant and replaces such subexpression with the constant.
> If the expression is a deterministic UDF and all the subexpressions are constants, the
value will be calculated immediately during compilation time (not runtime)
> So array is a deterministic UDF,  'Total' is string constant. So Hive tries to replace
result of evaluation UDF with the constant.
> But looks like, that Hive only supports primitives and struct objects.
> So, array is not supported yet.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message