final public SqlNodeList ColumnDefinitionList() throws ParseException { SqlParserPos pos; List<ColumnDefinition> list = Lists.newArrayList(); jj_consume_token(LPAREN); pos = getPos(); ColumnDef(list); label_3: while (true) { if (jj_2_45(2)) { ; } else { break label_3; } jj_consume_token(COMMA); ColumnDef(list); } jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
final public SqlNodeList ColumnDefinitionList() throws ParseException { SqlParserPos pos; List<ColumnDefinition> list = Lists.newArrayList(); jj_consume_token(LPAREN); pos = getPos(); ColumnDef(list); label_3: while (true) { if (jj_2_45(2)) { ; } else { break label_3; } jj_consume_token(COMMA); ColumnDef(list); } jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
final public SqlNodeList FunctionJarDefList() throws ParseException {SqlParserPos pos; List<SqlNode> list = Lists.newArrayList(); jj_consume_token(USING); pos = getPos(); pos = getPos(); FunctionJarDef(list); label_4: while (true) { if (jj_2_48(2)) { ; } else { break label_4; } jj_consume_token(COMMA); FunctionJarDef(list); } {if ("" != null) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
private SqlNode extend(SqlNode table, SqlNodeList extendList) { return SqlStdOperatorTable.EXTEND.createCall( table.getParserPosition().plus(extendList.getParserPosition()), table, extendList); }
private static SqlParserPos pos(PrecedenceClimbingParser.Token token) { switch (token.type) { case ATOM: return ((SqlNode) token.o).getParserPosition(); case CALL: final PrecedenceClimbingParser.Call call = (PrecedenceClimbingParser.Call) token; SqlParserPos pos = ((ToTreeListItem) call.op.o).pos; for (PrecedenceClimbingParser.Token arg : call.args) { pos = pos.plus(pos(arg)); } return pos; default: return ((ToTreeListItem) token.o).getPos(); } }
private static SqlParserPos pos(PrecedenceClimbingParser.Token token) { switch (token.type) { case ATOM: return ((SqlNode) token.o).getParserPosition(); case CALL: final PrecedenceClimbingParser.Call call = (PrecedenceClimbingParser.Call) token; SqlParserPos pos = ((ToTreeListItem) call.op.o).pos; for (PrecedenceClimbingParser.Token arg : call.args) { pos = pos.plus(pos(arg)); } return pos; default: return ((ToTreeListItem) token.o).getPos(); } }
/** * List of simple identifiers in parentheses. The position extends from the * open parenthesis to the close parenthesis. */ final public SqlNodeList ParenthesizedSimpleIdentifierList() throws ParseException { SqlParserPos pos; List<SqlNode> list = new ArrayList<SqlNode>(); jj_consume_token(LPAREN); pos = getPos(); SimpleIdentifierCommaList(list); jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
/** * List of compound identifiers in parentheses. The position extends from the * open parenthesis to the close parenthesis. */ final public SqlNodeList ParenthesizedCompoundIdentifierList() throws ParseException { SqlParserPos pos; List<SqlNode> list = new ArrayList<SqlNode>(); jj_consume_token(LPAREN); pos = getPos(); CompoundIdentifierCommaList(list); jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
final public void UniqueKey(List<SqlNodeList> list) throws ParseException { List<SqlNode> ukList = new ArrayList<SqlNode>(); SqlParserPos pos; SqlIdentifier columnName; jj_consume_token(UNIQUE); pos = getPos(); jj_consume_token(LPAREN); columnName = SimpleIdentifier(); ukList.add(columnName); label_5: while (true) { if (jj_2_60(2)) { ; } else { break label_5; } jj_consume_token(COMMA); columnName = SimpleIdentifier(); ukList.add(columnName); } jj_consume_token(RPAREN); SqlNodeList uk = new SqlNodeList(ukList, pos.plus(getPos())); list.add(uk); }
/** * Parses a VALUES leaf query expression. */ final public SqlNode TableConstructor() throws ParseException { SqlNodeList rowConstructorList; SqlParserPos pos; jj_consume_token(VALUES); pos = getPos(); rowConstructorList = RowConstructorList(pos); {if (true) return SqlStdOperatorTable.VALUES.createCall( pos.plus(getPos()), rowConstructorList.toArray());} throw new Error("Missing return statement in function"); }
private SqlNode extend(SqlNode table, SqlNodeList extendList) { return SqlStdOperatorTable.EXTEND.createCall( table.getParserPosition().plus(extendList.getParserPosition()), table, extendList); }
final public SqlNodeList ColumnDefinitionList() throws ParseException { SqlParserPos pos; List<ColumnDefinition> list = Lists.newArrayList(); jj_consume_token(LPAREN); pos = getPos(); ColumnDef(list); label_3: while (true) { if (jj_2_44(2)) { ; } else { break label_3; } jj_consume_token(COMMA); ColumnDef(list); } jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
final public SqlNodeList ExtendList() throws ParseException { SqlParserPos pos; List<SqlNode> list = Lists.newArrayList(); jj_consume_token(LPAREN); pos = getPos(); ColumnType(list); label_9: while (true) { if (jj_2_146(2)) { ; } else { break label_9; } jj_consume_token(COMMA); ColumnType(list); } jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
/** * List of simple identifiers in parentheses. The position extends from the * open parenthesis to the close parenthesis. */ final public SqlNodeList ParenthesizedSimpleIdentifierList() throws ParseException { SqlParserPos pos; List<SqlNode> list = new ArrayList<SqlNode>(); jj_consume_token(LPAREN); pos = getPos(); SimpleIdentifierCommaList(list); jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
/** * List of compound identifiers in parentheses. The position extends from the * open parenthesis to the close parenthesis. */ final public SqlNodeList ParenthesizedCompoundIdentifierList() throws ParseException { SqlParserPos pos; List<SqlNode> list = new ArrayList<SqlNode>(); jj_consume_token(LPAREN); pos = getPos(); CompoundIdentifierCommaList(list); jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
final public SqlWatermark Watermark() throws ParseException { SqlIdentifier watermarkName = null; SqlIdentifier columnName; SqlNode namedFunctionCall; SqlParserPos pos; jj_consume_token(WATERMARK); pos = getPos(); if (jj_2_64(2)) { watermarkName = SimpleIdentifier(); } else { ; } jj_consume_token(FOR); columnName = SimpleIdentifier(); jj_consume_token(AS); namedFunctionCall = NamedFunctionCall(); {if (true) return new SqlWatermark(watermarkName, columnName, namedFunctionCall, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
/** * Parses a VALUES leaf query expression. */ final public SqlNode TableConstructor() throws ParseException { SqlNodeList rowConstructorList; SqlParserPos pos; jj_consume_token(VALUES); pos = getPos(); rowConstructorList = RowConstructorList(pos); {if (true) return SqlStdOperatorTable.VALUES.createCall( pos.plus(getPos()), rowConstructorList.toArray());} throw new Error("Missing return statement in function"); }
/** Parses a numeric literal (can be signed) */ final public SqlLiteral NumericLiteral() throws ParseException { SqlNumericLiteral num; SqlParserPos pos; if (jj_2_264(2)) { jj_consume_token(PLUS); num = UnsignedNumericLiteral(); {if (true) return num;} } else if (jj_2_265(2)) { jj_consume_token(MINUS); pos = getPos(); num = UnsignedNumericLiteral(); {if (true) return SqlLiteral.createNegative(num, pos.plus(getPos()));} } else if (jj_2_266(2)) { num = UnsignedNumericLiteral(); {if (true) return num;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public SqlNodeList ExtendList() throws ParseException { SqlParserPos pos; List<SqlNode> list = Lists.newArrayList(); jj_consume_token(LPAREN); pos = getPos(); ColumnType(list); label_9: while (true) { if (jj_2_146(2)) { ; } else { break label_9; } jj_consume_token(COMMA); ColumnType(list); } jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }
final public SqlNodeList ColumnDefinitionList() throws ParseException { SqlParserPos pos; List<ColumnDefinition> list = Lists.newArrayList(); jj_consume_token(LPAREN); pos = getPos(); ColumnDef(list); label_3: while (true) { if (jj_2_44(2)) { ; } else { break label_3; } jj_consume_token(COMMA); ColumnDef(list); } jj_consume_token(RPAREN); {if (true) return new SqlNodeList(list, pos.plus(getPos()));} throw new Error("Missing return statement in function"); }