public class DrillSqlParseException
extends org.apache.calcite.sql.parser.SqlParseException
SqlParseException
classConstructor and Description |
---|
DrillSqlParseException(String sql,
org.apache.calcite.sql.parser.SqlParseException sqlParseException) |
DrillSqlParseException(String sql,
org.apache.calcite.sql.parser.SqlParserPos pos) |
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Builds error message just like the original
SqlParseException
with special handling for ParseException class. |
String |
getSqlWithErrorPointer()
Formats sql query which caused the exception by adding
error pointer ^ under incorrect expression.
|
getCause, getExpectedTokenNames, getExpectedTokenSequences, getPos, getTokenImages
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public DrillSqlParseException(String sql, org.apache.calcite.sql.parser.SqlParseException sqlParseException)
public DrillSqlParseException(String sql, org.apache.calcite.sql.parser.SqlParserPos pos)
public String getMessage()
SqlParseException
with special handling for ParseException
class.
This is customized implementation of the original Throwable.getMessage()
.
Any other underlying SqlParseException
exception messages goes through without changes
Example:
Given query: SELECT FROM (VALUES(1)); Generated message for the unsupported FROM token after SELECT would look like: Encountered "FROM" at line 1, column 8.
getMessage
in class Throwable
DrillSqlParseException
public String getSqlWithErrorPointer()
Copyright © 1970 The Apache Software Foundation. All rights reserved.