----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/2078/ -----------------------------------------------------------
(Updated 2011-10-05 23:32:22.234376) Review request for hive, Carl Steinbach, John Sichi, and Igor Kabiljo. Changes ------- Fixes to make unittests pass: 1.) The return resolver now always converts its input into a standard writable OI so that its output is not a constantoi. 2.) Fix spurious assert on EWAHBitmapEmpty. 3.) Add constant support for TIMESTAMP type. 4.) Make sure key/value/element OIs to ListOI/MapOI are writable. 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-2470. https://issues.apache.org/jira/browse/HIVE-2470 Diffs (updated) ----- ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.java 7da5d6a ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java ebc236d ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java 570e408 ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEWAHBitmapEmpty.java aa8d474 ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFUtils.java 832f823 ql/src/test/queries/clientpositive/constant_prop.q PRE-CREATION ql/src/test/results/clientpositive/constant_prop.q.out PRE-CREATION ql/src/test/results/clientpositive/str_to_map.q.out 30fa7ad 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 serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorFactory.java a37547f serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableConstantByteObjectInspector.java 5a7fe53 serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableConstantTimestampObjectInspector.java PRE-CREATION serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableConstantVoidObjectInspector.java f3aee4e serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableVoidObjectInspector.java 6f99561 Diff: https://reviews.apache.org/r/2078/diff Testing ------- ant test Thanks, Jonathan