FAQ
Repository: hive
Updated Branches:
   refs/heads/master 63f01db25 -> 637da9dd0


HIVE-12802 : CBO: Calcite Operator To Hive Operator (Calcite Return Path): MiniTezCliDriver.vector_join_filters.q failure(Hari Subramaniyan, reviewed by Jesus Camacho Rodriguez)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/637da9dd
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/637da9dd
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/637da9dd

Branch: refs/heads/master
Commit: 637da9dd0f5420a448dcaef3d1820222177b42b1
Parents: 63f01db
Author: Hari Subramaniyan <harisankar@apache.org>
Authored: Mon Jan 25 10:42:40 2016 -0800
Committer: Hari Subramaniyan <harisankar@apache.org>
Committed: Mon Jan 25 10:42:40 2016 -0800

----------------------------------------------------------------------
  .../ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java | 11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/637da9dd/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java
index f677f68..9f7f8a4 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java
@@ -42,6 +42,8 @@ import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveMultiJoin;

+import com.google.common.collect.Lists;
+
  public class HiveRelFieldTrimmer extends RelFieldTrimmer {

    protected static final Log LOG = LogFactory.getLog(HiveRelFieldTrimmer.class);
@@ -61,6 +63,7 @@ public class HiveRelFieldTrimmer extends RelFieldTrimmer {
        Set<RelDataTypeField> extraFields) {
      final int fieldCount = join.getRowType().getFieldCount();
      final RexNode conditionExpr = join.getCondition();
+ final List<RexNode> joinFilters = join.getJoinFilters();

      // Add in fields used in the condition.
      final Set<RelDataTypeField> combinedInputExtraFields =
@@ -131,6 +134,12 @@ public class HiveRelFieldTrimmer extends RelFieldTrimmer {
              mapping, newInputs.toArray(new RelNode[newInputs.size()]));
      RexNode newConditionExpr = conditionExpr.accept(shuttle);

+ List<RexNode> newJoinFilters = Lists.newArrayList();
+
+ for (RexNode joinFilter : joinFilters) {
+ newJoinFilters.add(joinFilter.accept(shuttle));
+ }
+
      final RelDataType newRowType = RelOptUtil.permute(join.getCluster().getTypeFactory(),
              join.getRowType(), mapping);
      final RelNode newJoin = new HiveMultiJoin(join.getCluster(),
@@ -139,7 +148,7 @@ public class HiveRelFieldTrimmer extends RelFieldTrimmer {
              newRowType,
              join.getJoinInputs(),
              join.getJoinTypes(),
- join.getJoinFilters());
+ newJoinFilters);

      return new TrimResult(newJoin, mapping);
    }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJan 25, '16 at 6:42p
activeJan 25, '16 at 6:42p
posts1
users1
websitehive.apache.org

1 user in discussion

Harisankar: 1 post

People

Translate

site design / logo © 2021 Grokbase