private boolean isNonEquiJoin(ExprNodeDesc predicate)  {
    Preconditions.checkArgument(predicate instanceof ExprNodeGenericFuncDesc);

    ExprNodeGenericFuncDesc funcDesc = (ExprNodeGenericFuncDesc) predicate;
    if (funcDesc.getGenericUDF() instanceof GenericUDFIn) {
      return false;
    }

    return true;
  }
This optimization looks for expressions of the kind "x IN (RS[n])". If such
an expression made it to a table scan operator and x is a partition column we
can use an existing join to dynamically prune partitions. This class sets up
the infrastructure for that.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java