org.apache.hadoop.hive.ql.plan
Class JoinDesc

java.lang.Object
  extended by org.apache.hadoop.hive.ql.plan.AbstractOperatorDesc
      extended by org.apache.hadoop.hive.ql.plan.JoinDesc
All Implemented Interfaces:
Serializable, Cloneable, OperatorDesc
Direct Known Subclasses:
HashTableSinkDesc, MapJoinDesc

public class JoinDesc
extends AbstractOperatorDesc

Join operator Descriptor implementation.

See Also:
Serialized Form

Field Summary
protected  JoinCondDesc[] conds
           
static int FULL_OUTER_JOIN
           
static int INNER_JOIN
           
static int LEFT_OUTER_JOIN
           
static int LEFT_SEMI_JOIN
           
protected  boolean noOuterJoin
           
protected  List<String> outputColumnNames
           
static int RIGHT_OUTER_JOIN
           
protected  Byte[] tagOrder
           
static int UNIQUE_JOIN
           
 
Constructor Summary
JoinDesc()
           
JoinDesc(JoinDesc clone)
           
JoinDesc(Map<Byte,List<ExprNodeDesc>> exprs, List<String> outputColumnNames)
           
JoinDesc(Map<Byte,List<ExprNodeDesc>> exprs, List<String> outputColumnNames, boolean noOuterJoin, JoinCondDesc[] conds)
           
JoinDesc(Map<Byte,List<ExprNodeDesc>> exprs, List<String> outputColumnNames, boolean noOuterJoin, JoinCondDesc[] conds, Map<Byte,List<ExprNodeDesc>> filters)
           
JoinDesc(Map<Byte,List<ExprNodeDesc>> exprs, List<String> outputColumnNames, JoinCondDesc[] conds)
           
 
Method Summary
 Object clone()
           
 Map<Byte,String> getBigKeysDirMap()
           
 JoinCondDesc[] getConds()
           
 List<JoinCondDesc> getCondsList()
           
 Map<Byte,List<ExprNodeDesc>> getExprs()
           
 Map<Byte,String> getExprsStringMap()
           
 int[][] getFilterMap()
           
 Map<Integer,String> getFilterMapString()
           
 Map<Byte,List<ExprNodeDesc>> getFilters()
           
 Map<Byte,String> getFiltersStringMap()
          Get the string representation of filters.
 boolean getHandleSkewJoin()
           
 TableDesc getKeyTableDesc()
           
 boolean getNoOuterJoin()
           
 boolean[] getNullSafes()
           
 String getNullSafeString()
           
 List<String> getOutputColumnNames()
           
 Map<String,Byte> getReversedExprs()
           
 int getSkewKeyDefinition()
           
 Map<Byte,TableDesc> getSkewKeysValuesTables()
           
 Map<Byte,Map<Byte,String>> getSmallKeysDirMap()
           
 Byte[] getTagOrder()
          The order in which tables should be processed when joining.
 boolean isNoOuterJoin()
           
 void setBigKeysDirMap(Map<Byte,String> bigKeysDirMap)
          set the mapping from tbl to dir for big keys.
 void setConds(JoinCondDesc[] conds)
           
 void setExprs(Map<Byte,List<ExprNodeDesc>> exprs)
           
 void setFilterMap(int[][] filterMap)
           
 void setFilters(Map<Byte,List<ExprNodeDesc>> filters)
           
 void setHandleSkewJoin(boolean handleSkewJoin)
          set to handle skew join in this join op.
 void setKeyTableDesc(TableDesc keyTblDesc)
           
 void setNoOuterJoin(boolean noOuterJoin)
           
 void setNullSafes(boolean[] nullSafes)
           
 void setOutputColumnNames(List<String> outputColumnNames)
           
 void setReversedExprs(Map<String,Byte> reversedExprs)
           
 void setSkewKeyDefinition(int skewKeyDefinition)
          set skew key definition.
 void setSkewKeysValuesTables(Map<Byte,TableDesc> skewKeysValuesTables)
           
 void setSmallKeysDirMap(Map<Byte,Map<Byte,String>> smallKeysDirMap)
          set the mapping from tbl to dir for small keys.
 void setTagOrder(Byte[] tagOrder)
          The order in which tables should be processed when joining.
protected  Map<Integer,String> toCompactString(int[][] filterMap)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INNER_JOIN

public static final int INNER_JOIN
See Also:
Constant Field Values

LEFT_OUTER_JOIN

public static final int LEFT_OUTER_JOIN
See Also:
Constant Field Values

RIGHT_OUTER_JOIN

public static final int RIGHT_OUTER_JOIN
See Also:
Constant Field Values

FULL_OUTER_JOIN

public static final int FULL_OUTER_JOIN
See Also:
Constant Field Values

UNIQUE_JOIN

public static final int UNIQUE_JOIN
See Also:
Constant Field Values

LEFT_SEMI_JOIN

public static final int LEFT_SEMI_JOIN
See Also:
Constant Field Values

outputColumnNames

protected List<String> outputColumnNames

noOuterJoin

protected boolean noOuterJoin

conds

protected JoinCondDesc[] conds

tagOrder

protected Byte[] tagOrder
Constructor Detail

JoinDesc

public JoinDesc()

JoinDesc

public JoinDesc(Map<Byte,List<ExprNodeDesc>> exprs,
                List<String> outputColumnNames,
                boolean noOuterJoin,
                JoinCondDesc[] conds,
                Map<Byte,List<ExprNodeDesc>> filters)

JoinDesc

public JoinDesc(Map<Byte,List<ExprNodeDesc>> exprs,
                List<String> outputColumnNames,
                boolean noOuterJoin,
                JoinCondDesc[] conds)

JoinDesc

public JoinDesc(Map<Byte,List<ExprNodeDesc>> exprs,
                List<String> outputColumnNames)

JoinDesc

public JoinDesc(Map<Byte,List<ExprNodeDesc>> exprs,
                List<String> outputColumnNames,
                JoinCondDesc[] conds)

JoinDesc

public JoinDesc(JoinDesc clone)
Method Detail

clone

public Object clone()
Specified by:
clone in interface OperatorDesc
Overrides:
clone in class AbstractOperatorDesc

getExprs

public Map<Byte,List<ExprNodeDesc>> getExprs()

getReversedExprs

public Map<String,Byte> getReversedExprs()

setReversedExprs

public void setReversedExprs(Map<String,Byte> reversedExprs)

getExprsStringMap

public Map<Byte,String> getExprsStringMap()

setExprs

public void setExprs(Map<Byte,List<ExprNodeDesc>> exprs)

getFiltersStringMap

public Map<Byte,String> getFiltersStringMap()
Get the string representation of filters. Returns null if they are no filters.

Returns:
Map from alias to filters on the alias.

getFilters

public Map<Byte,List<ExprNodeDesc>> getFilters()

setFilters

public void setFilters(Map<Byte,List<ExprNodeDesc>> filters)

getOutputColumnNames

public List<String> getOutputColumnNames()

setOutputColumnNames

public void setOutputColumnNames(List<String> outputColumnNames)

getNoOuterJoin

public boolean getNoOuterJoin()

setNoOuterJoin

public void setNoOuterJoin(boolean noOuterJoin)

getCondsList

public List<JoinCondDesc> getCondsList()

getConds

public JoinCondDesc[] getConds()

setConds

public void setConds(JoinCondDesc[] conds)

getTagOrder

public Byte[] getTagOrder()
The order in which tables should be processed when joining.

Returns:
Array of tags

setTagOrder

public void setTagOrder(Byte[] tagOrder)
The order in which tables should be processed when joining.

Parameters:
tagOrder - Array of tags

getHandleSkewJoin

public boolean getHandleSkewJoin()

setHandleSkewJoin

public void setHandleSkewJoin(boolean handleSkewJoin)
set to handle skew join in this join op.

Parameters:
handleSkewJoin -

getBigKeysDirMap

public Map<Byte,String> getBigKeysDirMap()
Returns:
mapping from tbl to dir for big keys.

setBigKeysDirMap

public void setBigKeysDirMap(Map<Byte,String> bigKeysDirMap)
set the mapping from tbl to dir for big keys.

Parameters:
bigKeysDirMap -

getSmallKeysDirMap

public Map<Byte,Map<Byte,String>> getSmallKeysDirMap()
Returns:
mapping from tbl to dir for small keys

setSmallKeysDirMap

public void setSmallKeysDirMap(Map<Byte,Map<Byte,String>> smallKeysDirMap)
set the mapping from tbl to dir for small keys.

Parameters:
smallKeysDirMap -

getSkewKeyDefinition

public int getSkewKeyDefinition()
Returns:
skew key definition. If we see a key's associated entries' number is bigger than this, we will define this key as a skew key.

setSkewKeyDefinition

public void setSkewKeyDefinition(int skewKeyDefinition)
set skew key definition.

Parameters:
skewKeyDefinition -

getSkewKeysValuesTables

public Map<Byte,TableDesc> getSkewKeysValuesTables()
Returns:
the table desc for storing skew keys and their corresponding value;

setSkewKeysValuesTables

public void setSkewKeysValuesTables(Map<Byte,TableDesc> skewKeysValuesTables)
Parameters:
skewKeysValuesTables - set the table desc for storing skew keys and their corresponding value;

isNoOuterJoin

public boolean isNoOuterJoin()

setKeyTableDesc

public void setKeyTableDesc(TableDesc keyTblDesc)

getKeyTableDesc

public TableDesc getKeyTableDesc()

getNullSafes

public boolean[] getNullSafes()

setNullSafes

public void setNullSafes(boolean[] nullSafes)

getNullSafeString

public String getNullSafeString()

getFilterMap

public int[][] getFilterMap()

setFilterMap

public void setFilterMap(int[][] filterMap)

getFilterMapString

public Map<Integer,String> getFilterMapString()

toCompactString

protected Map<Integer,String> toCompactString(int[][] filterMap)


Copyright © 2013 The Apache Software Foundation