private int getOutputSize(Operator<? extends OperatorDesc> operator,
      Set<String> bigTables) {

    // memoize decorator for getOutputSizeInternal
    if (cache.containsKey(operator)) {
      return cache.get(operator);
    }

    int result = getOutputSizeInternal(operator, bigTables);

    cache.put(operator, result);

    return result;
  }
Estimate the size of the output based on the STREAMTABLE hints. To do so
the whole tree is traversed. Possible sizes: 0: the operator and its
subtree don't contain any big tables 1: the subtree of the operator
contains a big table 2: the operator is a big table

@param operator
         The operator which output size is to be estimated
@param bigTables
         Set of tables that should be streamed
@return The estimated size - 0 (no streamed tables), 1 (streamed tables in
        subtree) or 2 (a streamed table)
ql/src/java/org/apache/hadoop/hive/ql/optimizer/JoinReorder.java