public CalciteContextException newValidationError(SqlNode node, Resources.ExInst<SqlValidatorException> e) { assert node != null; final SqlParserPos pos = node.getParserPosition(); return SqlUtil.newContextException(pos, e); }
void checkNonQueryExpression(ExprContext exprContext) throws ParseException { switch (exprContext) { case ACCEPT_QUERY: throw SqlUtil.newContextException(getPos(), RESOURCE.illegalNonQueryExpression()); } }
void checkQueryExpression(ExprContext exprContext) throws ParseException { switch (exprContext) { case ACCEPT_NON_QUERY: case ACCEPT_SUB_QUERY: case ACCEPT_CURSOR: throw SqlUtil.newContextException(getPos(), RESOURCE.illegalQueryExpression()); } }
void checkQueryExpression(ExprContext exprContext) throws ParseException { switch (exprContext) { case ACCEPT_NON_QUERY: case ACCEPT_SUB_QUERY: case ACCEPT_CURSOR: throw SqlUtil.newContextException(getPos(), RESOURCE.illegalQueryExpression()); } }
void checkNonQueryExpression(ExprContext exprContext) throws ParseException { switch (exprContext) { case ACCEPT_QUERY: throw SqlUtil.newContextException(getPos(), RESOURCE.illegalNonQueryExpression()); } }
/** * 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 { final SqlNode e; final Span s; jj_consume_token(CURSOR); s = span(); if (exprContext != ExprContext.ACCEPT_ALL && exprContext != ExprContext.ACCEPT_CURSOR) { {if (true) throw SqlUtil.newContextException(s.end(this), RESOURCE.illegalCursorExpression());} } e = Expression(ExprContext.ACCEPT_QUERY); {if (true) return SqlStdOperatorTable.CURSOR.createCall(s.end(e), e);} throw new Error("Missing return statement in function"); }
&& call.getFunctionQuantifier().getValue() == SqlSelectKeyword.DISTINCT) { final SqlParserPos pos = call.getParserPosition(); throw SqlUtil.newContextException(pos, Static.RESOURCE.functionQuantifierNotAllowed(call.toString()));
{if (true) throw SqlUtil.newContextException(s.pos(), RESOURCE.illegalOrderBy());}
nfrags++; } catch (NumberFormatException ex) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.illegalBinaryString(token.image));} nfrags++; } catch (NumberFormatException ex) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.illegalBinaryString(token.image));} literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.unknownCharacterSet(charSet));} literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.unknownCharacterSet(charSet));} jj_consume_token(QUOTED_STRING); if (unicodeEscapeChar == 0) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.unicodeEscapeUnexpected());}
/** * 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 { final SqlNode e; final Span s; jj_consume_token(CURSOR); s = span(); if (exprContext != ExprContext.ACCEPT_ALL && exprContext != ExprContext.ACCEPT_CURSOR) { {if (true) throw SqlUtil.newContextException(s.end(this), RESOURCE.illegalCursorExpression());} } e = Expression(ExprContext.ACCEPT_QUERY); {if (true) return SqlStdOperatorTable.CURSOR.createCall(s.end(e), e);} throw new Error("Missing return statement in function"); }
{if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.identifierTooLong(id, this.identifierMaxLength));}
{if (true) throw SqlUtil.newContextException(s.pos(), RESOURCE.illegalOrderBy());}
&& exprContext != ExprContext.ACCEPT_CURSOR) {if (true) throw SqlUtil.newContextException(s.end(list), RESOURCE.illegalRowExpression());} {if (true) throw SqlUtil.newContextException(span().end(list1), RESOURCE.illegalMinusDate());} } else {
nfrags++; } catch (NumberFormatException ex) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.illegalBinaryString(token.image));} nfrags++; } catch (NumberFormatException ex) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.illegalBinaryString(token.image));} literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.unknownCharacterSet(charSet));} literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.unknownCharacterSet(charSet));} jj_consume_token(QUOTED_STRING); if (unicodeEscapeChar == 0) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.unicodeEscapeUnexpected());}
void checkQueryExpression(ExprContext exprContext) throws ParseException {switch (exprContext) { case ACCEPT_NON_QUERY: case ACCEPT_SUB_QUERY: case ACCEPT_CURSOR: throw SqlUtil.newContextException(getPos(), RESOURCE.illegalQueryExpression()); } }
void checkNonQueryExpression(ExprContext exprContext) throws ParseException {switch (exprContext) { case ACCEPT_QUERY: throw SqlUtil.newContextException(getPos(), RESOURCE.illegalNonQueryExpression()); } }
{if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.identifierTooLong(id, this.identifierMaxLength));}
jj_consume_token(FROM); if (null == flag && null == trimChars) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.illegalFromEmpty());}
&& exprContext != ExprContext.ACCEPT_CURSOR) {if (true) throw SqlUtil.newContextException(s.end(list), RESOURCE.illegalRowExpression());} {if (true) throw SqlUtil.newContextException(span().end(list1), RESOURCE.illegalMinusDate());} } else {
jj_consume_token(FROM); if (null == flag && null == trimChars) { {if (true) throw SqlUtil.newContextException(getPos(), RESOURCE.illegalFromEmpty());}