[
https://issues.apache.org/jira/browse/HIVE-2470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119439#comment-13119439
]
[email protected] commented on HIVE-2470:
-----------------------------------------------------
bq. On 2011-10-03 08:31:46, Igor Kabiljo wrote:
bq. > Nice, this is even better then what I thought.
bq. >
bq. > This now supports all OIs, except for struct and unions, right? No
reason not to add structs, should we add both?
bq. > Also, should we change so that every VoidObjectInspector is constant
(not sure if that would complicate things more, in which case - no)?
bq. >
bq. > I still think it would be preferable that constant OI guarantees that
objects it returns are constant - if somebody changes returned value, next
values it returns shouldn't be affected. But this doesn't matter that much.
bq. >
* I agree that structs and unions would be good to have at some point but it
turns out they are much harder to implement. In particular, they contain
references to constituent OIs and do not have natural Java/Writable
equivalents. Thus, the way the constant value should be stored is not obvious
and you have weird interactions where some field OI maybe a constantOI but not
the whole thing, etc. This is complex enough that I think it's worth deferring
to another diff
* I will convert void OI to be constant.
* I'm not sure that constant OI guarantee that its objects are constant; it
might imply unnecessary copies and currently none of the rest of the UDF
architecture functions this way (most things passed around are writable and
it's up to consumers not to assume ownership).
- Jonathan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2078/#review2259
-----------------------------------------------------------
On 2011-10-03 01:36:16, Jonathan Chang wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/2078/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2011-10-03 01:36:16)
bq.
bq.
bq. Review request for hive, Carl Steinbach, John Sichi, and Igor Kabiljo.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. 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:
bq.
bq. 1.) Extends this functionality beyond primitive types to List/Map types.
bq. 2.) Fixes a bug in ExprNodeGenericFuncDesc where the constant value would
not propagate beyond one level of evaluation.
bq. 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.
bq.
bq.
bq. This addresses bug HIVE-2470.
bq. https://issues.apache.org/jira/browse/HIVE-2470
bq.
bq.
bq. Diffs
bq. -----
bq.
bq.
ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java
ebc236d
bq. ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.java
7da5d6a
bq. ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java
570e408
bq. ql/src/test/queries/clientpositive/constant_prop.q PRE-CREATION
bq. ql/src/test/results/clientpositive/constant_prop.q.out PRE-CREATION
bq.
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java
a4689fb
bq.
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
2c1a7e0
bq.
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardConstantListObjectInspector.java
PRE-CREATION
bq.
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardConstantMapObjectInspector.java
PRE-CREATION
bq.
bq. Diff: https://reviews.apache.org/r/2078/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. ant test
bq.
bq.
bq. Thanks,
bq.
bq. Jonathan
bq.
bq.
> Improve support for Constant Object Inspectors
> ----------------------------------------------
>
> Key: HIVE-2470
> URL: https://issues.apache.org/jira/browse/HIVE-2470
> Project: Hive
> Issue Type: Improvement
> Reporter: Jonathan Chang
> Assignee: Jonathan Chang
> Attachments: HIVE-1360.part2.patch, HIVE-2470.patch, HIVE-2470.patch.3
>
>
> ConstantObjectInspectors are nice but they need to be more widely supported
> and used. In particular,
> * More functions need to be using them.
> * There need to be facilities for propagating constness.
> * Support for complex types must be added.
--
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