org.apache.hadoop.hive.ql.exec
Class DummyStoreOperator
java.lang.Object
org.apache.hadoop.hive.ql.exec.Operator<DummyStoreDesc>
org.apache.hadoop.hive.ql.exec.DummyStoreOperator
- All Implemented Interfaces:
- Serializable, Cloneable, Node
public class DummyStoreOperator
- extends Operator<DummyStoreDesc>
- implements Serializable
For SortMerge joins, this is a dummy operator, which stores the row for the
small table before it reaches the sort merge join operator.
Consider a query like:
select * from
(subq1 --> has a filter)
join
(subq2 --> has a filter)
on some key
Let us assume that subq1 is the small table (either specified by the user or inferred
automatically). Since there can be multiple buckets/partitions for the table corresponding
to subq1 given a file in subq2, a priority queue is present in SMBMapJoinOperator to scan the
various buckets and fetch the least row (corresponding to the join key). The tree corresponding
to subq1 needs to be evaluated in order to compute the join key (since the select list for the
join key can move across different object inspectors).
Therefore the following operator tree is created:
TableScan (subq1) --> Select --> Filter --> DummyStore
\
\ SMBJoin
/
/
TableScan (subq2) --> Select --> Filter
In order to fetch the row with the least join key from the small table, the row from subq1
is partially processed, and stored in DummyStore. For the actual processing of the join,
SMBJoin (child of DummyStore) is processed for the transformed row. Note that in the absence of
support for joins for sub-queries, this was not needed, since all transformations were done
after SMBJoin, or for the small tables, nothing could have been present between TableScan and
SMBJoin.
- See Also:
- Serialized Form
Methods inherited from class org.apache.hadoop.hive.ql.exec.Operator |
acceptLimitPushdown, augmentPlan, cleanUpInputFileChanged, cleanUpInputFileChangedOp, clone, cloneOp, cloneRecursiveChildren, close, columnNamesRowResolvedCanBeObtained, dump, dump, endGroup, flush, getChildOperators, getChildren, getColumnExprMap, getConf, getConfiguration, getDone, getExecContext, getGroupKeyObject, getGroupKeyObjectInspector, getIdentifier, getInputObjInspectors, getName, getNumChild, getNumParent, getOperatorId, getOperatorName, getOpTraits, getOutputObjInspector, getParentOperators, getSchema, getStatistics, getStats, initialize, initializeLocalWork, initOperatorId, isUseBucketizedHiveInputFormat, jobClose, jobCloseOp, logStats, opAllowedAfterMapJoin, opAllowedBeforeMapJoin, opAllowedBeforeSortMergeJoin, opAllowedConvertMapJoin, passExecContext, preorderMap, processGroup, removeChild, removeChildAndAdoptItsChildren, removeChildren, removeParent, replaceChild, replaceParent, resetId, resetStats, setAlias, setChildOperators, setColumnExprMap, setConf, setExecContext, setGroupKeyObject, setGroupKeyObjectInspector, setId, setInputObjInspectors, setOperatorId, setOpTraits, setOutputCollector, setParentOperators, setReporter, setSchema, setStatistics, setUseBucketizedHiveInputFormat, startGroup, supportAutomaticSortMergeJoin, supportSkewJoinOptimization, supportUnionRemoveOptimization, toString, toString |
DummyStoreOperator
public DummyStoreOperator()
processOp
public void processOp(Object row,
int tag)
throws HiveException
- Description copied from class:
Operator
- Process the row.
- Specified by:
processOp
in class Operator<DummyStoreDesc>
- Parameters:
row
- The object representing the row.tag
- The tag of the row usually means which parent this row comes from.
Rows with the same tag should have exactly the same rowInspector
all the time.
- Throws:
HiveException
reset
public void reset()
- Overrides:
reset
in class Operator<DummyStoreDesc>
getResult
public InspectableObject getResult()
getType
public org.apache.hadoop.hive.ql.plan.api.OperatorType getType()
- Description copied from class:
Operator
- Return the type of the specific operator among the
types in OperatorType.
- Specified by:
getType
in class Operator<DummyStoreDesc>
- Returns:
- OperatorType.*
Copyright © 2014 The Apache Software Foundation. All rights reserved.