-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65084/
-----------------------------------------------------------
(Updated Jan. 12, 2018, 7:33 p.m.)
Review request for hive, Ashutosh Chauhan and Jesús Camacho Rodríguez.
Changes
-------
Missed another use of the deterministic UDFType annotation in the constant
propagation.
Bugs: HIVE-18430
https://issues.apache.org/jira/browse/HIVE-18430
Repository: hive-git
Description
-------
Add a runtimeConstant field to UDFType. Also add a new method
isConsistentWithinQuery() to FunctionRegistry/ExprNodeEvaluator, which
indicates whether the UDF/expression returns a consistent value during the life
of the query. Most existing calls to isDeterministic() should be switched to
use isConsistentWithinQuery().
current_timestamp/current_date/current_user/current_database/logged_in_user are
now tagged as non-determinstic, and runtime constants.
Jesus/Ashutosh: How does setting these functions to non-deterministic affect
Calcite? It appears that for Calcite operators, there is a isDynamicFunction()
which should return true in the case of runtime constants. Within Calcite
should isDeterministic() return true or false for these functions?
Diffs (updated)
-----
ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeEvaluator.java 375d65f
ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeEvaluatorFactory.java
cc40cae
ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java
8b9baa6
ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 7ca950d
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
b0a2da8
ql/src/java/org/apache/hadoop/hive/ql/optimizer/PrunerExpressionOperatorFactory.java
306e714
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveExceptRewriteRule.java
5b72dbd
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveIntersectRewriteRule.java
a5d950a
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/PartitionPrune.java
0e5e2b9
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java
13ee4e5
ql/src/java/org/apache/hadoop/hive/ql/optimizer/pcr/PcrExprProcFactory.java
461dbe5
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java
ac37cc4
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 5a88a96
ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 67ea32c
ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java 067fbe0
ql/src/java/org/apache/hadoop/hive/ql/ppd/ExprWalkerProcFactory.java d4df1e8
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java e265863
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java ac3ec58
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java ef8dcf0
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCurrentDate.java
1f027a2
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCurrentTimestamp.java
2f13a22
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCurrentUser.java
d97583d
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLoggedInUser.java
2915b86
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMacro.java
3f505f2
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/UDFCurrentDB.java a5bab4f
ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java 3589938
Diff: https://reviews.apache.org/r/65084/diff/2/
Changes: https://reviews.apache.org/r/65084/diff/1-2/
Testing
-------
Thanks,
Jason Dere