@Test(dataProvider = "exprDataProvider") public void testParseExpr(String expr, HiveConf conf, boolean success) { try { parseExpr(expr, conf); Assert.assertTrue(success); } catch (LensException e) { Assert.assertFalse(success); Assert.assertTrue(e.getMessage().contains(expr)); Assert.assertTrue(e.getMessage().contains(LensCubeErrorCode.COULD_NOT_PARSE_EXPRESSION.name())); } }
public static ASTNode parseExpr(String expr) throws LensException { return parseExpr(expr, null); }
HQLParser { public static ASTNode parseExpr(String expr) throws LensException { return parseExpr(expr, null); } }
HQLParser { public static ASTNode parseExpr(String expr) throws LensException { return parseExpr(expr, null); } private  HQLParser(); }
HQLParser { public static ASTNode parseExpr(String expr) throws LensException { return parseExpr(expr, null); } private  HQLParser(); static boolean isTableColumnAST(ASTNode astNode); static boolean isPrimitiveBooleanExpression(ASTNode ast); static boolean isPrimitiveBooleanFunction(ASTNode ast); static ASTNode getDotAST(String tableAlias, String fieldAlias); static ASTNode parseHQL(String query, HiveConf conf); static ASTNode parseExpr(String expr); static ASTNode parseExpr(String expr, Configuration conf); static ASTNode parseExpression(String command, Configuration conf); static void printAST(ASTNode node); static void printAST(Map<Integer, String> tokenMapping, ASTNode node, int level, int child); static Map<Integer, String> getHiveTokenMapping(); static ASTNode findNodeByPath(ASTNode root, int... path); static void bft(ASTNode root, ASTNodeVisitor visitor); static void toInfixString(ASTNode root, StringBuilder buf); static void toInfixString(ASTNode root, StringBuilder buf, AppendMode appendMode); static String getString(ASTNode tree, AppendMode appendMode); static String getString(ASTNode tree); static String getColName(ASTNode node); static Set<String> getColsInExpr(final String tableAlias, ASTNode expr); static boolean isAggregateAST(ASTNode node); static boolean isNonAggregateFunctionAST(ASTNode node); static boolean isSelectASTNode(final ASTNode node); static boolean hasAggregate(ASTNode node); static boolean equalsAST(ASTNode n1, ASTNode n2); static ASTNode leftMostChild(ASTNode node); }
HQLParser { public static ASTNode parseExpr(String expr) throws LensException { return parseExpr(expr, null); } private  HQLParser(); static boolean isTableColumnAST(ASTNode astNode); static boolean isPrimitiveBooleanExpression(ASTNode ast); static boolean isPrimitiveBooleanFunction(ASTNode ast); static ASTNode getDotAST(String tableAlias, String fieldAlias); static ASTNode parseHQL(String query, HiveConf conf); static ASTNode parseExpr(String expr); static ASTNode parseExpr(String expr, Configuration conf); static ASTNode parseExpression(String command, Configuration conf); static void printAST(ASTNode node); static void printAST(Map<Integer, String> tokenMapping, ASTNode node, int level, int child); static Map<Integer, String> getHiveTokenMapping(); static ASTNode findNodeByPath(ASTNode root, int... path); static void bft(ASTNode root, ASTNodeVisitor visitor); static void toInfixString(ASTNode root, StringBuilder buf); static void toInfixString(ASTNode root, StringBuilder buf, AppendMode appendMode); static String getString(ASTNode tree, AppendMode appendMode); static String getString(ASTNode tree); static String getColName(ASTNode node); static Set<String> getColsInExpr(final String tableAlias, ASTNode expr); static boolean isAggregateAST(ASTNode node); static boolean isNonAggregateFunctionAST(ASTNode node); static boolean isSelectASTNode(final ASTNode node); static boolean hasAggregate(ASTNode node); static boolean equalsAST(ASTNode n1, ASTNode n2); static ASTNode leftMostChild(ASTNode node); static final Pattern P_WSPACE; static final Set<Integer> BINARY_OPERATORS; static final Set<Integer> N_ARY_OPERATORS; static final Set<Integer> FILTER_OPERATORS; static final Set<Integer> ARITHMETIC_OPERATORS; static final Set<Integer> UNARY_OPERATORS; static final Set<Integer> PRIMITIVE_TYPES; }