FAQ
Author: jpullokk
Date: Fri Dec 12 19:20:05 2014
New Revision: 1645043

URL: http://svn.apache.org/r1645043
Log:
HIVE-9035 CBO: Disable PPD when functions are non-deterministic

Added:
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterProjectTransposeRule.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterSetOpTransposeRule.java
Modified:
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterJoinRule.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java?rev=1645043&r1=1645042&r2=1645043&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java Fri Dec 12 19:20:05 2014
@@ -34,11 +34,14 @@ import org.apache.calcite.rel.type.RelDa
  import org.apache.calcite.rex.RexBuilder;
  import org.apache.calcite.rex.RexInputRef;
  import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.rex.RexVisitor;
+import org.apache.calcite.rex.RexVisitorImpl;
  import org.apache.calcite.sql.SqlKind;
  import org.apache.calcite.sql.fun.SqlStdOperatorTable;
  import org.apache.calcite.sql.validate.SqlValidatorUtil;
  import org.apache.calcite.util.ImmutableBitSet;
  import org.apache.calcite.util.Pair;
+import org.apache.calcite.util.Util;
  import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin;
  import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject;
  import org.apache.hadoop.hive.ql.parse.ASTNode;
@@ -78,7 +81,7 @@ public class HiveCalciteUtil {
    public static boolean validateASTForUnsupportedTokens(ASTNode ast) {
      String astTree = ast.toStringTree();
      // if any of following tokens are present in AST, bail out
- String[] tokens = { "TOK_CHARSETLITERAL","TOK_TABLESPLITSAMPLE" };
+ String[] tokens = { "TOK_CHARSETLITERAL", "TOK_TABLESPLITSAMPLE" };
      for (String token : tokens) {
        if (astTree.contains(token)) {
          return false;
@@ -505,8 +508,8 @@ public class HiveCalciteUtil {

    /**
     * Get top level select starting from root. Assumption here is root can only
- * be Sort & Project. Also the top project should be at most 2 levels
- * below Sort; i.e Sort(Limit)-Sort(OB)-Select
+ * be Sort & Project. Also the top project should be at most 2 levels below
+ * Sort; i.e Sort(Limit)-Sort(OB)-Select
     *
     * @param rootRel
     * @return
@@ -527,4 +530,25 @@ public class HiveCalciteUtil {

      return (new Pair<RelNode, RelNode>(parentOforiginalProjRel, originalProjRel));
    }
+
+ public static boolean isDeterministic(RexNode expr) {
+ boolean deterministic = true;
+
+ RexVisitor<Void> visitor = new RexVisitorImpl<Void>(true) {
+ public Void visitCall(org.apache.calcite.rex.RexCall call) {
+ if (!call.getOperator().isDeterministic()) {
+ throw new Util.FoundOne(call);
+ }
+ return super.visitCall(call);
+ }
+ };
+
+ try {
+ expr.accept(visitor);
+ } catch (Util.FoundOne e) {
+ deterministic = false;
+ }
+
+ return deterministic;
+ }
  }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterJoinRule.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterJoinRule.java?rev=1645043&r1=1645042&r2=1645043&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterJoinRule.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterJoinRule.java Fri Dec 12 19:20:05 2014
@@ -24,6 +24,7 @@ import java.util.ListIterator;
  import org.apache.calcite.plan.RelOptRule;
  import org.apache.calcite.plan.RelOptRuleCall;
  import org.apache.calcite.plan.RelOptRuleOperand;
+import org.apache.calcite.plan.RelOptUtil;
  import org.apache.calcite.plan.RelOptUtil.InputFinder;
  import org.apache.calcite.rel.core.Filter;
  import org.apache.calcite.rel.core.Join;
@@ -34,6 +35,7 @@ import org.apache.calcite.rex.RexCall;
  import org.apache.calcite.rex.RexNode;
  import org.apache.calcite.sql.SqlKind;
  import org.apache.calcite.util.ImmutableBitSet;
+import org.apache.hadoop.hive.ql.optimizer.calcite.HiveCalciteUtil;
  import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveFilter;
  import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject;

@@ -57,13 +59,21 @@ public abstract class HiveFilterJoinRule
     */
    public static class HiveFilterJoinMergeRule extends HiveFilterJoinRule {
      public HiveFilterJoinMergeRule() {
- super(RelOptRule.operand(Filter.class,
- RelOptRule.operand(Join.class, RelOptRule.any())),
+ super(RelOptRule.operand(Filter.class, RelOptRule.operand(Join.class, RelOptRule.any())),
            "HiveFilterJoinRule:filter", true, HiveFilter.DEFAULT_FILTER_FACTORY,
            HiveProject.DEFAULT_PROJECT_FACTORY);
      }

      @Override
+ public boolean matches(RelOptRuleCall call) {
+ Filter filter = call.rel(0);
+ if (!HiveCalciteUtil.isDeterministic(filter.getCondition())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
      public void onMatch(RelOptRuleCall call) {
        Filter filter = call.rel(0);
        Join join = call.rel(1);
@@ -73,9 +83,22 @@ public abstract class HiveFilterJoinRule

    public static class HiveFilterJoinTransposeRule extends HiveFilterJoinRule {
      public HiveFilterJoinTransposeRule() {
- super(RelOptRule.operand(Join.class, RelOptRule.any()),
- "HiveFilterJoinRule:no-filter", true, HiveFilter.DEFAULT_FILTER_FACTORY,
- HiveProject.DEFAULT_PROJECT_FACTORY);
+ super(RelOptRule.operand(Join.class, RelOptRule.any()), "HiveFilterJoinRule:no-filter", true,
+ HiveFilter.DEFAULT_FILTER_FACTORY, HiveProject.DEFAULT_PROJECT_FACTORY);
+ }
+
+ @Override
+ public boolean matches(RelOptRuleCall call) {
+ Join join = call.rel(0);
+ List<RexNode> joinConds = RelOptUtil.conjunctions(join.getCondition());
+
+ for (RexNode joinCnd : joinConds) {
+ if (!HiveCalciteUtil.isDeterministic(joinCnd)) {
+ return false;
+ }
+ }
+
+ return true;
      }

      @Override
@@ -140,12 +163,11 @@ public abstract class HiveFilterJoinRule
      boolean refersToBothSides = false;

      int joinNoOfProjects = j.getRowType().getFieldCount();
- ImmutableBitSet filterProjs = ImmutableBitSet.FROM_BIT_SET.apply(
- new BitSet(joinNoOfProjects));
- ImmutableBitSet allLeftProjs = filterProjs.union(
- ImmutableBitSet.range(0, j.getInput(0).getRowType().getFieldCount()));
- ImmutableBitSet allRightProjs = filterProjs.union(
- ImmutableBitSet.range(j.getInput(0).getRowType().getFieldCount(), joinNoOfProjects));
+ ImmutableBitSet filterProjs = ImmutableBitSet.FROM_BIT_SET.apply(new BitSet(joinNoOfProjects));
+ ImmutableBitSet allLeftProjs = filterProjs.union(ImmutableBitSet.range(0, j.getInput(0)
+ .getRowType().getFieldCount()));
+ ImmutableBitSet allRightProjs = filterProjs.union(ImmutableBitSet.range(j.getInput(0)
+ .getRowType().getFieldCount(), joinNoOfProjects));

      filterProjs = filterProjs.union(InputFinder.bits(filter));


Added: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterProjectTransposeRule.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterProjectTransposeRule.java?rev=1645043&view=auto
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterProjectTransposeRule.java (added)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterProjectTransposeRule.java Fri Dec 12 19:20:05 2014
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.optimizer.calcite.rules;
+
+import org.apache.calcite.plan.RelOptRuleCall;
+import org.apache.calcite.rel.core.Filter;
+import org.apache.calcite.rel.core.Project;
+import org.apache.calcite.rel.core.RelFactories.FilterFactory;
+import org.apache.calcite.rel.core.RelFactories.ProjectFactory;
+import org.apache.calcite.rel.rules.FilterProjectTransposeRule;
+import org.apache.calcite.rex.RexNode;
+import org.apache.hadoop.hive.ql.optimizer.calcite.HiveCalciteUtil;
+
+public class HiveFilterProjectTransposeRule extends FilterProjectTransposeRule {
+
+ public HiveFilterProjectTransposeRule(Class<? extends Filter> filterClass,
+ FilterFactory filterFactory, Class<? extends Project> projectClass,
+ ProjectFactory projectFactory) {
+ super(filterClass, filterFactory, projectClass, projectFactory);
+ }
+
+ @Override
+ public boolean matches(RelOptRuleCall call) {
+ final Filter filterRel = call.rel(0);
+ RexNode condition = filterRel.getCondition();
+ if (!HiveCalciteUtil.isDeterministic(condition)) {
+ return false;
+ }
+
+ return super.matches(call);
+ }
+}

Added: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterSetOpTransposeRule.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterSetOpTransposeRule.java?rev=1645043&view=auto
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterSetOpTransposeRule.java (added)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterSetOpTransposeRule.java Fri Dec 12 19:20:05 2014
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.optimizer.calcite.rules;
+
+import org.apache.calcite.plan.RelOptRuleCall;
+import org.apache.calcite.rel.core.Filter;
+import org.apache.calcite.rel.core.RelFactories.FilterFactory;
+import org.apache.calcite.rel.rules.FilterSetOpTransposeRule;
+import org.apache.calcite.rex.RexNode;
+import org.apache.hadoop.hive.ql.optimizer.calcite.HiveCalciteUtil;
+
+public class HiveFilterSetOpTransposeRule extends FilterSetOpTransposeRule {
+
+ public HiveFilterSetOpTransposeRule(FilterFactory filterFactory) {
+ super(filterFactory);
+ }
+
+ @Override
+ public boolean matches(RelOptRuleCall call) {
+ Filter filterRel = call.rel(0);
+ RexNode condition = filterRel.getCondition();
+ if (!HiveCalciteUtil.isDeterministic(condition)) {
+ return false;
+ }
+
+ return super.matches(call);
+ }
+}

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java?rev=1645043&r1=1645042&r2=1645043&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java Fri Dec 12 19:20:05 2014
@@ -78,7 +78,8 @@ public class SqlFunctionConverter {
    }

    public static SqlOperator getCalciteOperator(String funcTextName, GenericUDF hiveUDF,
- ImmutableList<RelDataType> calciteArgTypes, RelDataType retType) throws CalciteSemanticException {
+ ImmutableList<RelDataType> calciteArgTypes, RelDataType retType)
+ throws CalciteSemanticException {
      // handle overloaded methods first
      if (hiveUDF instanceof GenericUDFOPNegative) {
        return SqlStdOperatorTable.UNARY_MINUS;
@@ -87,15 +88,16 @@ public class SqlFunctionConverter {
      } // do generic lookup
      String name = null;
      if (StringUtils.isEmpty(funcTextName)) {
- name = getName(hiveUDF); // this should probably never happen, see getName
- // comment
+ name = getName(hiveUDF); // this should probably never happen, see
+ // getName
+ // comment
        LOG.warn("The function text was empty, name from annotation is " + name);
      } else {
- // We could just do toLowerCase here and let SA qualify it, but let's be
- // proper...
+ // We could just do toLowerCase here and let SA qualify it, but
+ // let's be proper...
        name = FunctionRegistry.getNormalizedFunctionName(funcTextName);
      }
- return getCalciteFn(name, calciteArgTypes, retType);
+ return getCalciteFn(name, calciteArgTypes, retType, FunctionRegistry.isDeterministic(hiveUDF));
    }

    public static GenericUDF getHiveUDF(SqlOperator op, RelDataType dt, int argsLength) {
@@ -129,7 +131,8 @@ public class SqlFunctionConverter {
      return hFn == null ? null : hFn.getGenericUDF();
    }

- private static FunctionInfo handleExplicitCast(SqlOperator op, RelDataType dt) throws SemanticException {
+ private static FunctionInfo handleExplicitCast(SqlOperator op, RelDataType dt)
+ throws SemanticException {
      FunctionInfo castUDF = null;

      if (op.kind == SqlKind.CAST) {
@@ -158,7 +161,7 @@ public class SqlFunctionConverter {
          castUDF = FunctionRegistry.getFunctionInfo("double");
        } else if (castType.equals(TypeInfoFactory.timestampTypeInfo)) {
          castUDF = FunctionRegistry.getFunctionInfo("timestamp");
- } else if (castType.equals(TypeInfoFactory.dateTypeInfo)) {
+ } else if (castType.equals(TypeInfoFactory.dateTypeInfo)) {
          castUDF = FunctionRegistry.getFunctionInfo("date");
        } else if (castType instanceof DecimalTypeInfo) {
          castUDF = handleCastForParameterizedType(castType,
@@ -182,8 +185,8 @@ public class SqlFunctionConverter {
      return new FunctionInfo(fi.isNative(), fi.getDisplayName(), (GenericUDF) udf);
    }

- // TODO: 1) handle Agg Func Name translation 2) is it correct to add func args
- // as child of func?
+ // TODO: 1) handle Agg Func Name translation 2) is it correct to add func
+ // args as child of func?
    public static ASTNode buildAST(SqlOperator op, List<ASTNode> children) {
      HiveToken hToken = calciteToHiveToken.get(op);
      ASTNode node;
@@ -232,11 +235,9 @@ public class SqlFunctionConverter {
    }

    // TODO: this is not valid. Function names for built-in UDFs are specified in
- // FunctionRegistry,
- // and only happen to match annotations. For user UDFs, the name is what user
- // specifies at
- // creation time (annotation can be absent, different, or duplicate some other
- // function).
+ // FunctionRegistry, and only happen to match annotations. For user UDFs, the
+ // name is what user specifies at creation time (annotation can be absent,
+ // different, or duplicate some other function).
    private static String getName(GenericUDF hiveUDF) {
      String udfName = null;
      if (hiveUDF instanceof GenericUDFBridge) {
@@ -268,10 +269,12 @@ public class SqlFunctionConverter {
      return udfName;
    }

- /** This class is used to build immutable hashmaps in the static block above. */
+ /**
+ * This class is used to build immutable hashmaps in the static block above.
+ */
    private static class StaticBlockBuilder {
- final Map<String, SqlOperator> hiveToCalcite = Maps.newHashMap();
- final Map<SqlOperator, HiveToken> calciteToHiveToken = Maps.newHashMap();
+ final Map<String, SqlOperator> hiveToCalcite = Maps.newHashMap();
+ final Map<SqlOperator, HiveToken> calciteToHiveToken = Maps.newHashMap();
      final Map<SqlOperator, String> reverseOperatorMap = Maps.newHashMap();

      StaticBlockBuilder() {
@@ -317,6 +320,7 @@ public class SqlFunctionConverter {
      return new HiveToken(type, text);
    }

+ // UDAF is assumed to be deterministic
    public static class CalciteUDAF extends SqlAggFunction {
      public CalciteUDAF(String opName, SqlReturnTypeInference returnTypeInference,
          SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker,
@@ -326,6 +330,22 @@ public class SqlFunctionConverter {
      }
    }

+ private static class CalciteSqlFn extends SqlFunction {
+ private final boolean deterministic;
+
+ public CalciteSqlFn(String name, SqlKind kind, SqlReturnTypeInference returnTypeInference,
+ SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker,
+ SqlFunctionCategory category, boolean deterministic) {
+ super(name, kind, returnTypeInference, operandTypeInference, operandTypeChecker, category);
+ this.deterministic = deterministic;
+ }
+
+ @Override
+ public boolean isDeterministic() {
+ return deterministic;
+ }
+ }
+
    private static class CalciteUDFInfo {
      private String udfName;
      private SqlReturnTypeInference returnTypeInference;
@@ -354,22 +374,21 @@ public class SqlFunctionConverter {
    }

    public static SqlOperator getCalciteFn(String hiveUdfName,
- ImmutableList<RelDataType> calciteArgTypes, RelDataType calciteRetType)
+ ImmutableList<RelDataType> calciteArgTypes, RelDataType calciteRetType, boolean deterministic)
        throws CalciteSemanticException {

      if (hiveUdfName != null && hiveUdfName.trim().equals("<=>")) {
        // We can create Calcite IS_DISTINCT_FROM operator for this. But since our
        // join reordering algo cant handle this anyway there is no advantage of
- // this.
- // So, bail out for now.
+ // this.So, bail out for now.
        throw new CalciteSemanticException("<=> is not yet supported for cbo.");
      }
      SqlOperator calciteOp = hiveToCalcite.get(hiveUdfName);
      if (calciteOp == null) {
        CalciteUDFInfo uInf = getUDFInfo(hiveUdfName, calciteArgTypes, calciteRetType);
- calciteOp = new SqlFunction(uInf.udfName, SqlKind.OTHER_FUNCTION, uInf.returnTypeInference,
+ calciteOp = new CalciteSqlFn(uInf.udfName, SqlKind.OTHER_FUNCTION, uInf.returnTypeInference,
            uInf.operandTypeInference, uInf.operandTypeChecker,
- SqlFunctionCategory.USER_DEFINED_FUNCTION);
+ SqlFunctionCategory.USER_DEFINED_FUNCTION, deterministic);
      }

      return calciteOp;
@@ -381,8 +400,8 @@ public class SqlFunctionConverter {
      if (calciteAggFn == null) {
        CalciteUDFInfo uInf = getUDFInfo(hiveUdfName, calciteArgTypes, calciteRetType);

- calciteAggFn = new CalciteUDAF(uInf.udfName, uInf.returnTypeInference, uInf.operandTypeInference,
- uInf.operandTypeChecker, uInf.argTypes, uInf.retType);
+ calciteAggFn = new CalciteUDAF(uInf.udfName, uInf.returnTypeInference,
+ uInf.operandTypeInference, uInf.operandTypeChecker, uInf.argTypes, uInf.retType);
      }

      return calciteAggFn;

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=1645043&r1=1645042&r2=1645043&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Fri Dec 12 19:20:05 2014
@@ -194,6 +194,8 @@ import org.apache.hadoop.hive.ql.optimiz
  import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan;
  import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveUnion;
  import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveFilterJoinRule;
+import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveFilterProjectTransposeRule;
+import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveFilterSetOpTransposeRule;
  import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HivePartitionPruneRule;
  import org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter;
  import org.apache.hadoop.hive.ql.optimizer.calcite.translator.JoinCondTypeCheckProcFactory;
@@ -12673,9 +12675,9 @@ public class SemanticAnalyzer extends Ba
                SemiJoinProjectTransposeRule.INSTANCE);

        basePlan = hepPlan(basePlan, true, mdProvider,
- new FilterProjectTransposeRule(
+ new HiveFilterProjectTransposeRule(
            Filter.class, HiveFilter.DEFAULT_FILTER_FACTORY, HiveProject.class,
- HiveProject.DEFAULT_PROJECT_FACTORY), new FilterSetOpTransposeRule(
+ HiveProject.DEFAULT_PROJECT_FACTORY), new HiveFilterSetOpTransposeRule(
            HiveFilter.DEFAULT_FILTER_FACTORY), new FilterMergeRule(
            HiveFilter.DEFAULT_FILTER_FACTORY), HiveFilterJoinRule.JOIN,
            HiveFilterJoinRule.FILTER_ON_JOIN,

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedDec 12, '14 at 7:20p
activeDec 12, '14 at 7:20p
posts1
users1
websitehive.apache.org

1 user in discussion

Jpullokk: 1 post

People

Translate

site design / logo © 2021 Grokbase