FAQ
Author: hashutosh
Date: Thu Feb 26 17:58:35 2015
New Revision: 1662511

URL: http://svn.apache.org/r1662511
Log:
HIVE-9796 : CBO (Calcite Return Path): Add field nullable check to HiveJoinAddNotNullRule [CBO branch] (Jesus Camacho Rodriguez via Ashutosh Chauhan)

Modified:
     hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveJoinAddNotNullRule.java

Modified: hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveJoinAddNotNullRule.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveJoinAddNotNullRule.java?rev=1662511&r1=1662510&r2=1662511&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveJoinAddNotNullRule.java (original)
+++ hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveJoinAddNotNullRule.java Thu Feb 26 17:58:35 2015
@@ -152,6 +152,10 @@ public final class HiveJoinAddNotNullRul
      for (int pos : inputKeyPositions) {
        try {
          RelDataType keyType = input.getRowType().getFieldList().get(pos).getType();
+ // Nothing to do if key cannot be null
+ if (!keyType.isNullable()) {
+ continue;
+ }
          SqlOperator funcCall = SqlFunctionConverter.getCalciteOperator(NOT_NULL_FUNC_NAME,
                  FunctionRegistry.getFunctionInfo(NOT_NULL_FUNC_NAME).getGenericUDF(),
                  ImmutableList.of(keyType), returnType);

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedFeb 26, '15 at 5:58p
activeFeb 26, '15 at 5:58p
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2021 Grokbase