private static String getColumnName(ExprNodeGenericFuncDesc expr,
                                      int variable) {
    List<ExprNodeDesc> children = expr.getChildren();
    if (variable < 0 || variable >= children.size()) {
      return null;
    }
    ExprNodeDesc child = children.get(variable);
    if (child instanceof ExprNodeColumnDesc) {
      return ((ExprNodeColumnDesc) child).getColumn();
    }
    return null;
  }
Get the column name referenced in the expression. It must be at the top
level of this expression and there must be exactly one column.
@param expr the expression to look in
@param variable the slot the variable is expected in
@return the column name or null if there isn't exactly one column
ql/src/java/org/apache/hadoop/hive/ql/io/sarg/ConvertAstToSearchArg.java