private void insertSkewFilter(
      List<TableScanOperator> tableScanOpsForJoin,
      Map<List<ExprNodeDesc>, List<List<String>>> skewedValuesList,
      boolean skewed) {

      ExprNodeDesc filterExpr = constructFilterExpr(skewedValuesList, skewed);
      for (TableScanOperator tableScanOp : tableScanOpsForJoin) {
        insertFilterOnTop(tableScanOp, filterExpr);
      }
    }
Inserts a filter comparing the join keys with the skewed keys. If the table
is skewed with values (k1, v1) and (k2, v2) on columns (key, value), then
filter ((key=k1 AND value=v1) OR (key=k2 AND value=v2)) is inserted. If @skewed
is false, a NOT is inserted before it.
@param tableScanOpsForJoin table scans for which the filter will be inserted
@param skewedValuesList the map of <expressions, list of skewed values>
@param skewed True if we want skewedCol = skewedValue, false if we want
not (skewedCol = skewedValue)
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SkewJoinOptimizer.java