@Test
  public void testExpression9() throws Exception {
    /* first_name = last_name */
    String exprStr = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n" +
        "<java version=\"1.6.0_31\" class=\"java.beans.XMLDecoder\"> \n" +
        " <object class=\"org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc\"> \n" +
        "  <void property=\"children\"> \n" +
        "   <object class=\"java.util.ArrayList\"> \n" +
        "    <void method=\"add\"> \n" +
        "     <object class=\"org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc\"> \n" +
        "      <void property=\"column\"> \n" +
        "       <string>id</string> \n" +
        "      </void> \n" +
        "      <void property=\"tabAlias\"> \n" +
        "       <string>orc_people</string> \n" +
        "      </void> \n" +
        "      <void property=\"typeInfo\"> \n" +
        "       <object id=\"PrimitiveTypeInfo0\" class=\"org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo\"> \n" +
        "        <void property=\"typeName\"> \n" +
        "         <string>int</string> \n" +
        "        </void> \n" +
        "       </object> \n" +
        "      </void> \n" +
        "     </object> \n" +
        "    </void> \n" +
        "    <void method=\"add\"> \n" +
        "     <object class=\"org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc\"> \n" +
        "      <void property=\"children\"> \n" +
        "       <object class=\"java.util.ArrayList\"> \n" +
        "        <void method=\"add\"> \n" +
        "         <object class=\"org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc\"> \n" +
        "          <void property=\"children\"> \n" +
        "           <object class=\"java.util.ArrayList\"> \n" +
        "            <void method=\"add\"> \n" +
        "             <object class=\"org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc\"> \n" +
        "              <void property=\"typeInfo\"> \n" +
        "               <object idref=\"PrimitiveTypeInfo0\"/> \n" +
        "              </void> \n" +
        "              <void property=\"value\"> \n" +
        "               <int>1</int> \n" +
        "              </void> \n" +
        "             </object> \n" +
        "            </void> \n" +
        "            <void method=\"add\"> \n" +
        "             <object class=\"org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc\"> \n" +
        "              <void property=\"typeInfo\"> \n" +
        "               <object idref=\"PrimitiveTypeInfo0\"/> \n" +
        "              </void> \n" +
        "              <void property=\"value\"> \n" +
        "               <int>3</int> \n" +
        "              </void> \n" +
        "             </object> \n" +
        "            </void> \n" +
        "           </object> \n" +
        "          </void> \n" +
        "          <void property=\"genericUDF\"> \n" +
        "           <object class=\"org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge\"> \n" +
        "            <void property=\"operator\"> \n" +
        "             <boolean>true</boolean> \n" +
        "            </void> \n" +
        "            <void property=\"udfClassName\"> \n" +
        "             <string>org.apache.hadoop.hive.ql.udf.UDFOPPlus</string> \n" +
        "            </void> \n" +
        "            <void property=\"udfName\"> \n" +
        "             <string>+</string> \n" +
        "            </void> \n" +
        "           </object> \n" +
        "          </void> \n" +
        "          <void property=\"typeInfo\"> \n" +
        "           <object idref=\"PrimitiveTypeInfo0\"/> \n" +
        "          </void> \n" +
        "         </object> \n" +
        "        </void> \n" +
        "        <void method=\"add\"> \n" +
        "         <object class=\"org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc\"> \n" +
        "          <void property=\"typeInfo\"> \n" +
        "           <object idref=\"PrimitiveTypeInfo0\"/> \n" +
        "          </void> \n" +
        "          <void property=\"value\"> \n" +
        "           <int>4</int> \n" +
        "          </void> \n" +
        "         </object> \n" +
        "        </void> \n" +
        "       </object> \n" +
        "      </void> \n" +
        "      <void property=\"genericUDF\"> \n" +
        "       <object class=\"org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge\"> \n" +
        "        <void property=\"operator\"> \n" +
        "         <boolean>true</boolean> \n" +
        "        </void> \n" +
        "        <void property=\"udfClassName\"> \n" +
        "         <string>org.apache.hadoop.hive.ql.udf.UDFOPPlus</string> \n" +
        "        </void> \n" +
        "        <void property=\"udfName\"> \n" +
        "         <string>+</string> \n" +
        "        </void> \n" +
        "       </object> \n" +
        "      </void> \n" +
        "      <void property=\"typeInfo\"> \n" +
        "       <object idref=\"PrimitiveTypeInfo0\"/> \n" +
        "      </void> \n" +
        "     </object> \n" +
        "    </void> \n" +
        "   </object> \n" +
        "  </void> \n" +
        "  <void property=\"genericUDF\"> \n" +
        "   <object class=\"org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqual\"/> \n" +
        "  </void> \n" +
        "  <void property=\"typeInfo\"> \n" +
        "   <object class=\"org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo\"> \n" +
        "    <void property=\"typeName\"> \n" +
        "     <string>boolean</string> \n" +
        "    </void> \n" +
        "   </object> \n" +
        "  </void> \n" +
        " </object> \n" +
        "</java> ";

    ConvertAstToSearchArg.Result result = ConvertAstToSearchArg.createSearchArgument(conf, getFuncDesc(exprStr));
    assertFalse(result.isPartial());
    SearchArgumentImpl sarg =
        (SearchArgumentImpl) result.getSearchArgument();
    List<PredicateLeaf> leaves = sarg.getLeaves();
    assertEquals(0, leaves.size());

    assertEquals("YES_NO_NULL",
        sarg.getExpression().toString());
    assertEquals(TruthValue.YES_NO_NULL, sarg.evaluate(values()));
  }
These tests cover the conversion from Hive's AST to SearchArguments.
ql/src/test/org/apache/hadoop/hive/ql/io/sarg/TestConvertAstToSearchArg.java