/** * Parses a SQL expression (such as might occur in a WHERE clause) followed by * the end-of-file symbol. */ final public SqlNode SqlExpressionEof() throws ParseException { SqlNode e; e = Expression(ExprContext.ACCEPT_SUB_QUERY); jj_consume_token(0); {if (true) return e;} throw new Error("Missing return statement in function"); }
/** * Parses the optional WHERE clause for SELECT, DELETE, and UPDATE. */ final public SqlNode WhereOpt() throws ParseException { SqlNode condition; if (jj_2_154(2)) { jj_consume_token(WHERE); condition = Expression(ExprContext.ACCEPT_SUB_QUERY); {if (true) return condition;} } else { {if (true) return null;} } throw new Error("Missing return statement in function"); }
/** * Parses the optional HAVING clause for SELECT. */ final public SqlNode HavingOpt() throws ParseException { SqlNode e; if (jj_2_163(2)) { jj_consume_token(HAVING); e = Expression(ExprContext.ACCEPT_SUB_QUERY); {if (true) return e;} } else { {if (true) return null;} } throw new Error("Missing return statement in function"); }
/** * Parses a SQL expression (such as might occur in a WHERE clause) followed by * the end-of-file symbol. */ final public SqlNode SqlExpressionEof() throws ParseException { SqlNode e; e = Expression(ExprContext.ACCEPT_SUB_QUERY); jj_consume_token(0); {if (true) return e;} throw new Error("Missing return statement in function"); }
/** * Parses the optional HAVING clause for SELECT. */ final public SqlNode HavingOpt() throws ParseException { SqlNode e; if (jj_2_163(2)) { jj_consume_token(HAVING); e = Expression(ExprContext.ACCEPT_SUB_QUERY); {if (true) return e;} } else { {if (true) return null;} } throw new Error("Missing return statement in function"); }
/** * Parses the optional WHERE clause for SELECT, DELETE, and UPDATE. */ final public SqlNode WhereOpt() throws ParseException { SqlNode condition; if (jj_2_154(2)) { jj_consume_token(WHERE); condition = Expression(ExprContext.ACCEPT_SUB_QUERY); {if (true) return condition;} } else { {if (true) return null;} } throw new Error("Missing return statement in function"); }
/** * Parses a list of expressions separated by commas. */ final public SqlNodeList ExpressionCommaList(SqlParserPos pos, ExprContext exprContext) throws ParseException { List<SqlNode> list; SqlNode e; e = Expression(exprContext); if (pos == null) { pos = getPos(); } pos = pos.plus(getPos()); list = startList(e); label_12: while (true) { if (jj_2_162(2)) { ; } else { break label_12; } jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); list.add(e); pos = pos.plus(getPos()); } {if (true) return new SqlNodeList(list, pos);} throw new Error("Missing return statement in function"); }
/** * Parses either a row expression, a leaf query expression, or * a parenthesized expression of any kind. */ final public SqlNode LeafQueryOrExpr(ExprContext exprContext) throws ParseException { SqlNode e; if (jj_2_195(2)) { e = Expression(exprContext); {if (true) return e;} } else if (jj_2_196(2)) { e = LeafQuery(exprContext); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
/** * Parses a CURSOR(query) expression. The parser allows these * anywhere, but the validator restricts them to appear only as * arguments to table functions. */ final public SqlNode CursorExpression(ExprContext exprContext) throws ParseException { SqlNode e; SqlParserPos pos; jj_consume_token(CURSOR); pos = getPos(); if (exprContext != ExprContext.ACCEPT_ALL && exprContext != ExprContext.ACCEPT_CURSOR) { {if (true) throw SqlUtil.newContextException(pos, RESOURCE.illegalCursorExpression());} } e = Expression(ExprContext.ACCEPT_QUERY); {if (true) return SqlStdOperatorTable.CURSOR.createCall(pos, e);} throw new Error("Missing return statement in function"); }
/** * Parses a call to TIMESTAMPADD. */ final public SqlCall TimestampAddFunctionCall() throws ParseException { List<SqlNode> args; SqlNode e; SqlParserPos pos; TimeUnit interval; SqlNode node; jj_consume_token(TIMESTAMPADD); pos = getPos(); jj_consume_token(LPAREN); interval = TimestampInterval(); args = startList(SqlLiteral.createSymbol(interval, getPos())); jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); args.add(e); jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); args.add(e); jj_consume_token(RPAREN); {if (true) return SqlStdOperatorTable.TIMESTAMP_ADD.createCall( pos.plus(getPos()), SqlParserUtil.toNodeArray(args));} throw new Error("Missing return statement in function"); }
/** * Parses a call to TIMESTAMPDIFF. */ final public SqlCall TimestampDiffFunctionCall() throws ParseException { List<SqlNode> args; SqlNode e; SqlParserPos pos; TimeUnit interval; SqlNode node; jj_consume_token(TIMESTAMPDIFF); pos = getPos(); jj_consume_token(LPAREN); interval = TimestampInterval(); args = startList(SqlLiteral.createSymbol(interval, getPos())); jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); args.add(e); jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); args.add(e); jj_consume_token(RPAREN); {if (true) return SqlStdOperatorTable.TIMESTAMP_DIFF.createCall( pos.plus(getPos()), SqlParserUtil.toNodeArray(args));} throw new Error("Missing return statement in function"); }
/** * Parses one unaliased expression in a select list. */ final public SqlNode SelectExpression() throws ParseException { SqlNode e; if (jj_2_106(2)) { jj_consume_token(STAR); {if (true) return SqlIdentifier.star(getPos());} } else if (jj_2_107(2)) { e = Expression(ExprContext.ACCEPT_SUB_QUERY); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
/** * Parses a list of expressions separated by commas. */ final public SqlNodeList ExpressionCommaList(SqlParserPos pos, ExprContext exprContext) throws ParseException { List<SqlNode> list; SqlNode e; e = Expression(exprContext); if (pos == null) { pos = getPos(); } pos = pos.plus(getPos()); list = startList(e); label_12: while (true) { if (jj_2_162(2)) { ; } else { break label_12; } jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); list.add(e); pos = pos.plus(getPos()); } {if (true) return new SqlNodeList(list, pos);} throw new Error("Missing return statement in function"); }
/** * Parses a CURSOR(query) expression. The parser allows these * anywhere, but the validator restricts them to appear only as * arguments to table functions. */ final public SqlNode CursorExpression(ExprContext exprContext) throws ParseException { SqlNode e; SqlParserPos pos; jj_consume_token(CURSOR); pos = getPos(); if (exprContext != ExprContext.ACCEPT_ALL && exprContext != ExprContext.ACCEPT_CURSOR) { {if (true) throw SqlUtil.newContextException(pos, RESOURCE.illegalCursorExpression());} } e = Expression(ExprContext.ACCEPT_QUERY); {if (true) return SqlStdOperatorTable.CURSOR.createCall(pos, e);} throw new Error("Missing return statement in function"); }
/** * Parses either a row expression, a leaf query expression, or * a parenthesized expression of any kind. */ final public SqlNode LeafQueryOrExpr(ExprContext exprContext) throws ParseException { SqlNode e; if (jj_2_195(2)) { e = Expression(exprContext); {if (true) return e;} } else if (jj_2_196(2)) { e = LeafQuery(exprContext); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public void Arg(List list, ExprContext exprContext) throws ParseException { SqlIdentifier name = null; SqlNode e = null; if (jj_2_25(2)) { name = SimpleIdentifier(); jj_consume_token(NAMED_ARGUMENT_ASSIGNMENT); } else { ; } if (jj_2_26(2)) { jj_consume_token(DEFAULT_KW); e = SqlStdOperatorTable.DEFAULT.createCall(getPos()); } else if (jj_2_27(2)) { e = Expression(exprContext); } else { jj_consume_token(-1); throw new ParseException(); } if (e != null) { if (name != null) { e = SqlStdOperatorTable.ARGUMENT_ASSIGNMENT.createCall( name.getParserPosition().plus(e.getParserPosition()), e, name); } list.add(e); } }
/** * Parses a call to TIMESTAMPADD. */ final public SqlCall TimestampAddFunctionCall() throws ParseException { List<SqlNode> args; SqlNode e; SqlParserPos pos; TimeUnit interval; SqlNode node; jj_consume_token(TIMESTAMPADD); pos = getPos(); jj_consume_token(LPAREN); interval = TimestampInterval(); args = startList(SqlLiteral.createSymbol(interval, getPos())); jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); args.add(e); jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); args.add(e); jj_consume_token(RPAREN); {if (true) return SqlStdOperatorTable.TIMESTAMP_ADD.createCall( pos.plus(getPos()), SqlParserUtil.toNodeArray(args));} throw new Error("Missing return statement in function"); }
/** * Parses a call to TIMESTAMPDIFF. */ final public SqlCall TimestampDiffFunctionCall() throws ParseException { List<SqlNode> args; SqlNode e; SqlParserPos pos; TimeUnit interval; SqlNode node; jj_consume_token(TIMESTAMPDIFF); pos = getPos(); jj_consume_token(LPAREN); interval = TimestampInterval(); args = startList(SqlLiteral.createSymbol(interval, getPos())); jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); args.add(e); jj_consume_token(COMMA); e = Expression(ExprContext.ACCEPT_SUB_QUERY); args.add(e); jj_consume_token(RPAREN); {if (true) return SqlStdOperatorTable.TIMESTAMP_DIFF.createCall( pos.plus(getPos()), SqlParserUtil.toNodeArray(args));} throw new Error("Missing return statement in function"); }
/** * Parses one unaliased expression in a select list. */ final public SqlNode SelectExpression() throws ParseException { SqlNode e; if (jj_2_106(2)) { jj_consume_token(STAR); {if (true) return SqlIdentifier.star(getPos());} } else if (jj_2_107(2)) { e = Expression(ExprContext.ACCEPT_SUB_QUERY); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public void Arg(List list, ExprContext exprContext) throws ParseException { SqlIdentifier name = null; SqlNode e = null; if (jj_2_25(2)) { name = SimpleIdentifier(); jj_consume_token(NAMED_ARGUMENT_ASSIGNMENT); } else { ; } if (jj_2_26(2)) { jj_consume_token(DEFAULT_KW); e = SqlStdOperatorTable.DEFAULT.createCall(getPos()); } else if (jj_2_27(2)) { e = Expression(exprContext); } else { jj_consume_token(-1); throw new ParseException(); } if (e != null) { if (name != null) { e = SqlStdOperatorTable.ARGUMENT_ASSIGNMENT.createCall( name.getParserPosition().plus(e.getParserPosition()), e, name); } list.add(e); } }