private ExprNodeDesc generateInClause(ExprNodeDesc predicate) throws SemanticException {
      Map<SemanticRule, SemanticNodeProcessor> exprRules = new LinkedHashMap<SemanticRule, SemanticNodeProcessor>();
      exprRules.put(new TypeRule(ExprNodeGenericFuncDesc.class), new OrExprProcessor());

      // The dispatcher fires the processor corresponding to the closest matching
      // rule and passes the context along
      SemanticDispatcher disp = new DefaultRuleDispatcher(null, exprRules, null);
      SemanticGraphWalker egw = new PreOrderOnceWalker(disp);

      List<Node> startNodes = new ArrayList<Node>();
      startNodes.add(predicate);

      HashMap<Node, Object> outputMap = new HashMap<Node, Object>();
      egw.startWalking(startNodes, outputMap);
      return (ExprNodeDesc) outputMap.get(predicate);
    }
This optimization will take a Filter expression, and if its predicate contains
an OR operator whose children are constant equality expressions, it will try
to generate an IN clause (which is more efficient). If the OR operator contains
AND operator children, the optimization might generate an IN clause that uses
structs.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/PointLookupOptimizer.java