Package org.apache.calcite.sql.parser
Class SqlParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.calcite.sql.parser.SqlParseException
- All Implemented Interfaces:
Serializable
,CalciteParserException
SqlParseException defines a checked exception corresponding to
SqlParser
.- See Also:
-
Constructor Summary
ConstructorDescriptionSqlParseException
(String message, SqlParserPos pos, int[][] expectedTokenSequences, String[] tokenImages, Throwable parserException) Creates a SqlParseException. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SqlParseException
public SqlParseException(String message, SqlParserPos pos, int[][] expectedTokenSequences, String[] tokenImages, Throwable parserException) Creates a SqlParseException.- Parameters:
message
- Messagepos
- PositionexpectedTokenSequences
- Token sequencestokenImages
- Token imagesparserException
- Parser exception
-
-
Method Details
-
getPos
Returns the position where this error occurred.- Returns:
- parser position
-
getExpectedTokenNames
Returns a list of the token names which could have legally occurred at this point.If some of the alternatives contain multiple tokens, returns the last token of only these longest sequences. (This occurs when the parser is maintaining more than the usual lookup.) For instance, if the possible tokens are
{"IN"} {"BETWEEN"} {"LIKE"} {"=", "<IDENTIFIER>"} {"=", "USER"}
returns
"<IDENTIFIER>" "USER"
- Returns:
- list of token names which could have occurred at this point
-
getTokenImages
Returns the token images.- Returns:
- token images
-
getExpectedTokenSequences
public int[][] getExpectedTokenSequences()Returns the expected token sequences.- Returns:
- expected token sequences
-
getCause
-