private static Object findLiteral(Configuration conf, ExprNodeGenericFuncDesc expr,
                                    final BoxType boxType) {
    List<ExprNodeDesc> children = expr.getChildren();
    if (children.size() != 2) {
      return null;
    }
    Object result = null;
    for(ExprNodeDesc child: children) {
      Object currentResult = getLiteral(conf, child, boxType);
      if (currentResult != null) {
        // Both children in the expression should not be literal
        if (result != null) {
          return null;
        }
        result = currentResult;
      }
    }
    return result;
  }
Find the child that is the literal.
@param expr the parent node to check
@param boxType the type of the expression
@return the literal boxed if found or null
ql/src/java/org/apache/hadoop/hive/ql/io/sarg/ConvertAstToSearchArg.java