[ 
https://issues.apache.org/jira/browse/HIVE-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115984#comment-13115984
 ] 

jirapos...@reviews.apache.org commented on HIVE-1360:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2078/
-----------------------------------------------------------

Review request for hive, Carl Steinbach, John Sichi, and Igor Kabiljo.


Summary
-------

ConstantObjectInspectors were introduced in a previous patch so that UDF's 
could have access to constant values at initialize time.  This diff adds the 
following improvements:

1.) Extends this functionality beyond primitive types to List/Map types.
2.) Fixes a bug in ExprNodeGenericFuncDesc where the constant value would not 
propagate beyond one level of evaluation.
3.) Adds a helper class to make functions constant-aware.  By inheriting from 
this class they return constant OIs if all their arguments are constant, and 
they cache the result so that computation is only done during initialize().  
Some functions such as ARRAY/IF/MAP have been migrated.


This addresses bug HIVE-1360.
    https://issues.apache.org/jira/browse/HIVE-1360


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.java 
7da5d6a 
  
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/ConstantFoldableGenericUDF.java
 PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArray.java 
1cf97c8 
  
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArrayContains.java 
d60dc86 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFIf.java 9a6a7ff 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMap.java 3b71c48 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java 
b384717 
  ql/src/test/queries/clientpositive/constant_prop.q PRE-CREATION 
  ql/src/test/results/clientpositive/constant_prop.q.out PRE-CREATION 
  
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java
 a4689fb 
  
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
 2c1a7e0 
  
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardConstantListObjectInspector.java
 PRE-CREATION 
  
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardConstantMapObjectInspector.java
 PRE-CREATION 

Diff: https://reviews.apache.org/r/2078/diff


Testing
-------

ant test


Thanks,

Jonathan


                
> Allow UDFs to access constant parameter values at compile time
> --------------------------------------------------------------
>
>                 Key: HIVE-1360
>                 URL: https://issues.apache.org/jira/browse/HIVE-1360
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor, UDF
>    Affects Versions: 0.5.0
>            Reporter: Carl Steinbach
>            Assignee: Jonathan Chang
>             Fix For: 0.8.0
>
>         Attachments: HIVE-1360.2.patch.txt, HIVE-1360.2.test-failures.txt, 
> HIVE-1360.3.patch, HIVE-1360.patch, HIVE-1360.patch
>
>
> UDFs should be able to access constant parameter values at compile time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to