org.apache.hadoop.hive.ql.exec
Class JoinUtil

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.JoinUtil

public class JoinUtil
extends Object


Constructor Summary
JoinUtil()
           
 
Method Summary
static ArrayList<Object> computeKeys(Object row, List<ExprNodeEvaluator> keyFields, List<ObjectInspector> keyFieldsOI)
          Return the key as a standard object.
static AbstractMapJoinKey computeMapJoinKeys(Object row, List<ExprNodeEvaluator> keyFields, List<ObjectInspector> keyFieldsOI)
          Return the key as a standard object.
static Object[] computeMapJoinValues(Object row, List<ExprNodeEvaluator> valueFields, List<ObjectInspector> valueFieldsOI, List<ExprNodeEvaluator> filters, List<ObjectInspector> filtersOI, int[] filterMap)
          Return the value as a standard object.
static ArrayList<Object> computeValues(Object row, List<ExprNodeEvaluator> valueFields, List<ObjectInspector> valueFieldsOI, List<ExprNodeEvaluator> filters, List<ObjectInspector> filtersOI, int[] filterMap)
          Return the value as a standard object.
static HashMap<Byte,List<ObjectInspector>> getObjectInspectorsFromEvaluators(Map<Byte,List<ExprNodeEvaluator>> exprEntries, ObjectInspector[] inputObjInspector, int posBigTableAlias)
           
static RowContainer getRowContainer(org.apache.hadoop.conf.Configuration hconf, List<ObjectInspector> structFieldObjectInspectors, Byte alias, int containerSize, Map<Byte,TableDesc> spillTableDesc, JoinDesc conf, boolean noFilter, org.apache.hadoop.mapred.Reporter reporter)
           
static SerDe getSpillSerDe(byte alias, Map<Byte,TableDesc> spillTableDesc, JoinDesc conf, boolean noFilter)
           
static TableDesc getSpillTableDesc(Byte alias, Map<Byte,TableDesc> spillTableDesc, JoinDesc conf, boolean noFilter)
           
static Map<Byte,TableDesc> getSpillTableDesc(Map<Byte,TableDesc> spillTableDesc, JoinDesc conf, boolean noFilter)
           
static HashMap<Byte,List<ObjectInspector>> getStandardObjectInspectors(Map<Byte,List<ObjectInspector>> aliasToObjectInspectors, int posBigTableAlias)
           
protected static boolean hasAnyFiltered(byte tag)
           
static Map<Byte,TableDesc> initSpillTables(JoinDesc conf, boolean noFilter)
           
protected static boolean isFiltered(byte filter, int tag)
           
protected static byte isFiltered(Object row, List<ExprNodeEvaluator> filters, List<ObjectInspector> ois, int[] filterMap)
          Returns true if the row does not pass through filters.
static int populateJoinKeyValue(Map<Byte,List<ExprNodeEvaluator>> outMap, Map<Byte,List<ExprNodeDesc>> inputMap, Byte[] order, int posBigTableAlias)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinUtil

public JoinUtil()
Method Detail

getObjectInspectorsFromEvaluators

public static HashMap<Byte,List<ObjectInspector>> getObjectInspectorsFromEvaluators(Map<Byte,List<ExprNodeEvaluator>> exprEntries,
                                                                                    ObjectInspector[] inputObjInspector,
                                                                                    int posBigTableAlias)
                                                                             throws HiveException
Throws:
HiveException

getStandardObjectInspectors

public static HashMap<Byte,List<ObjectInspector>> getStandardObjectInspectors(Map<Byte,List<ObjectInspector>> aliasToObjectInspectors,
                                                                              int posBigTableAlias)

populateJoinKeyValue

public static int populateJoinKeyValue(Map<Byte,List<ExprNodeEvaluator>> outMap,
                                       Map<Byte,List<ExprNodeDesc>> inputMap,
                                       Byte[] order,
                                       int posBigTableAlias)

computeKeys

public static ArrayList<Object> computeKeys(Object row,
                                            List<ExprNodeEvaluator> keyFields,
                                            List<ObjectInspector> keyFieldsOI)
                                     throws HiveException
Return the key as a standard object. StandardObject can be inspected by a standard ObjectInspector.

Throws:
HiveException

computeMapJoinKeys

public static AbstractMapJoinKey computeMapJoinKeys(Object row,
                                                    List<ExprNodeEvaluator> keyFields,
                                                    List<ObjectInspector> keyFieldsOI)
                                             throws HiveException
Return the key as a standard object. StandardObject can be inspected by a standard ObjectInspector.

Throws:
HiveException

computeMapJoinValues

public static Object[] computeMapJoinValues(Object row,
                                            List<ExprNodeEvaluator> valueFields,
                                            List<ObjectInspector> valueFieldsOI,
                                            List<ExprNodeEvaluator> filters,
                                            List<ObjectInspector> filtersOI,
                                            int[] filterMap)
                                     throws HiveException
Return the value as a standard object. StandardObject can be inspected by a standard ObjectInspector.

Throws:
HiveException

computeValues

public static ArrayList<Object> computeValues(Object row,
                                              List<ExprNodeEvaluator> valueFields,
                                              List<ObjectInspector> valueFieldsOI,
                                              List<ExprNodeEvaluator> filters,
                                              List<ObjectInspector> filtersOI,
                                              int[] filterMap)
                                       throws HiveException
Return the value as a standard object. StandardObject can be inspected by a standard ObjectInspector.

Throws:
HiveException

isFiltered

protected static byte isFiltered(Object row,
                                 List<ExprNodeEvaluator> filters,
                                 List<ObjectInspector> ois,
                                 int[] filterMap)
                          throws HiveException
Returns true if the row does not pass through filters.

Throws:
HiveException

isFiltered

protected static boolean isFiltered(byte filter,
                                    int tag)

hasAnyFiltered

protected static boolean hasAnyFiltered(byte tag)

getSpillTableDesc

public static TableDesc getSpillTableDesc(Byte alias,
                                          Map<Byte,TableDesc> spillTableDesc,
                                          JoinDesc conf,
                                          boolean noFilter)

getSpillTableDesc

public static Map<Byte,TableDesc> getSpillTableDesc(Map<Byte,TableDesc> spillTableDesc,
                                                    JoinDesc conf,
                                                    boolean noFilter)

getSpillSerDe

public static SerDe getSpillSerDe(byte alias,
                                  Map<Byte,TableDesc> spillTableDesc,
                                  JoinDesc conf,
                                  boolean noFilter)

initSpillTables

public static Map<Byte,TableDesc> initSpillTables(JoinDesc conf,
                                                  boolean noFilter)

getRowContainer

public static RowContainer getRowContainer(org.apache.hadoop.conf.Configuration hconf,
                                           List<ObjectInspector> structFieldObjectInspectors,
                                           Byte alias,
                                           int containerSize,
                                           Map<Byte,TableDesc> spillTableDesc,
                                           JoinDesc conf,
                                           boolean noFilter,
                                           org.apache.hadoop.mapred.Reporter reporter)
                                    throws HiveException
Throws:
HiveException


Copyright © 2013 The Apache Software Foundation