if (!context.conf.getBoolVar(HiveConf.ConfVars.HIVECONVERTJOIN)) {
return null;
}
JoinOperator joinOp = (JoinOperator) nd;
// if we have traits, and table info is present in the traits, we know the
// exact number of buckets. Else choose the largest number of estimated
// reducers from the parent operators.
int numBuckets = -1;
int estimatedBuckets = -1;
for (Operator<? extends OperatorDesc>parentOp : joinOp.getParentOperators()) {
if (parentOp.getOpTraits().getNumBuckets() > 0) {
numBuckets = (numBuckets < parentOp.getOpTraits().getNumBuckets()) ?
parentOp.getOpTraits().getNumBuckets() : numBuckets;
}
ReduceSinkOperator rs = (ReduceSinkOperator)parentOp;