org.apache.hadoop.hive.ql.optimizer.optiq
Class JoinUtil.JoinPredicateInfo

java.lang.Object
  extended by org.apache.hadoop.hive.ql.optimizer.optiq.JoinUtil.JoinPredicateInfo
Enclosing class:
JoinUtil

public static class JoinUtil.JoinPredicateInfo
extends Object

JoinPredicateInfo represents Join condition; JoinPredicate Info uses JoinLeafPredicateInfo to represent individual conjunctive elements in the predicate.
JoinPredicateInfo = JoinLeafPredicateInfo1 and JoinLeafPredicateInfo2...

JoinPredicateInfo:
1. preserves the order of conjuctive elements for equi-join(m_equiJoinPredicateElements)
2. Stores set of projection indexes from left and right child which is part of equi join keys; the indexes are both in child and Join node schema.
3. Keeps a map of projection indexes that are part of join keys to list of conjuctive elements(JoinLeafPredicateInfo) that uses them.


Constructor Summary
JoinUtil.JoinPredicateInfo(List<JoinUtil.JoinLeafPredicateInfo> nonEquiJoinPredicateElements, List<JoinUtil.JoinLeafPredicateInfo> equiJoinPredicateElements, Set<Integer> projsFromLeftPartOfJoinKeysInChildSchema, Set<Integer> projsFromRightPartOfJoinKeysInChildSchema, Set<Integer> projsFromRightPartOfJoinKeysInJoinSchema, Map<Integer,com.google.common.collect.ImmutableList<JoinUtil.JoinLeafPredicateInfo>> mapOfProjIndxInJoinSchemaToLeafPInfo)
           
 
Method Summary
static JoinUtil.JoinPredicateInfo constructJoinPredicateInfo(HiveJoinRel j)
           
static JoinUtil.JoinPredicateInfo constructJoinPredicateInfo(HiveJoinRel j, org.eigenbase.rex.RexNode predicate)
           
 List<JoinUtil.JoinLeafPredicateInfo> getEquiJoinPredicateElements()
           
 Map<Integer,com.google.common.collect.ImmutableList<JoinUtil.JoinLeafPredicateInfo>> getMapOfProjIndxToLeafPInfo()
           
 List<JoinUtil.JoinLeafPredicateInfo> getNonEquiJoinPredicateElements()
           
 Set<Integer> getProjsFromLeftPartOfJoinKeysInChildSchema()
           
 Set<Integer> getProjsFromLeftPartOfJoinKeysInJoinSchema()
          NOTE: Join Schema = left Schema + (right Schema offset by left.fieldcount).
 Set<Integer> getProjsFromRightPartOfJoinKeysInChildSchema()
           
 Set<Integer> getProjsFromRightPartOfJoinKeysInJoinSchema()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinUtil.JoinPredicateInfo

public JoinUtil.JoinPredicateInfo(List<JoinUtil.JoinLeafPredicateInfo> nonEquiJoinPredicateElements,
                                  List<JoinUtil.JoinLeafPredicateInfo> equiJoinPredicateElements,
                                  Set<Integer> projsFromLeftPartOfJoinKeysInChildSchema,
                                  Set<Integer> projsFromRightPartOfJoinKeysInChildSchema,
                                  Set<Integer> projsFromRightPartOfJoinKeysInJoinSchema,
                                  Map<Integer,com.google.common.collect.ImmutableList<JoinUtil.JoinLeafPredicateInfo>> mapOfProjIndxInJoinSchemaToLeafPInfo)
Method Detail

getNonEquiJoinPredicateElements

public List<JoinUtil.JoinLeafPredicateInfo> getNonEquiJoinPredicateElements()

getEquiJoinPredicateElements

public List<JoinUtil.JoinLeafPredicateInfo> getEquiJoinPredicateElements()

getProjsFromLeftPartOfJoinKeysInChildSchema

public Set<Integer> getProjsFromLeftPartOfJoinKeysInChildSchema()

getProjsFromRightPartOfJoinKeysInChildSchema

public Set<Integer> getProjsFromRightPartOfJoinKeysInChildSchema()

getProjsFromLeftPartOfJoinKeysInJoinSchema

public Set<Integer> getProjsFromLeftPartOfJoinKeysInJoinSchema()
NOTE: Join Schema = left Schema + (right Schema offset by left.fieldcount). Hence its ok to return projections from left in child schema.


getProjsFromRightPartOfJoinKeysInJoinSchema

public Set<Integer> getProjsFromRightPartOfJoinKeysInJoinSchema()

getMapOfProjIndxToLeafPInfo

public Map<Integer,com.google.common.collect.ImmutableList<JoinUtil.JoinLeafPredicateInfo>> getMapOfProjIndxToLeafPInfo()

constructJoinPredicateInfo

public static JoinUtil.JoinPredicateInfo constructJoinPredicateInfo(HiveJoinRel j)

constructJoinPredicateInfo

public static JoinUtil.JoinPredicateInfo constructJoinPredicateInfo(HiveJoinRel j,
                                                                    org.eigenbase.rex.RexNode predicate)


Copyright © 2014 The Apache Software Foundation. All rights reserved.