@Test
  public void testBigintSarg() throws Exception {
    ExprNodeGenericFuncDesc node =
        getColumnEqualsConstantExpression(TypeInfoFactory.intTypeInfo, "bi", 12345);
    String serialAst = SerializationUtilities.serializeExpression(node);

    ConvertAstToSearchArg convertAstToSearchArg = new ConvertAstToSearchArg(conf, SerializationUtilities.deserializeExpression(serialAst));
    assertFalse(convertAstToSearchArg.isPartial());
    SearchArgument sarg = convertAstToSearchArg.buildSearchArgument();
    assertEquals("leaf-0", sarg.getExpression().toOldString());
    assertEquals(1, sarg.getLeaves().size());
    PredicateLeaf leaf = sarg.getLeaves().get(0);
    assertEquals(PredicateLeaf.Type.LONG, leaf.getType());
    assertEquals("(EQUALS bi 12345)", leaf.toString());
  }
These tests cover the conversion from Hive's AST to SearchArguments.
ql/src/test/org/apache/hadoop/hive/ql/io/sarg/TestConvertAstToSearchArg.java