Class DrillSqlParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.calcite.sql.parser.SqlParseException
org.apache.drill.exec.planner.sql.parser.impl.DrillSqlParseException
- All Implemented Interfaces:
Serializable
,org.apache.calcite.util.CalciteParserException
public class DrillSqlParseException
extends org.apache.calcite.sql.parser.SqlParseException
Customized
SqlParseException
class- See Also:
-
Constructor Summary
ConstructorDescriptionDrillSqlParseException
(String sql, org.apache.calcite.sql.parser.SqlParseException sqlParseException) DrillSqlParseException
(String sql, org.apache.calcite.sql.parser.SqlParserPos pos) -
Method Summary
Modifier and TypeMethodDescriptionBuilds error message just like the originalSqlParseException
with special handling forParseException
class.Formats sql query which caused the exception by adding error pointer ^ under incorrect expression.Methods inherited from class org.apache.calcite.sql.parser.SqlParseException
getCause, getExpectedTokenNames, getExpectedTokenSequences, getPos, getTokenImages
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DrillSqlParseException
public DrillSqlParseException(String sql, org.apache.calcite.sql.parser.SqlParseException sqlParseException) -
DrillSqlParseException
-
-
Method Details
-
getMessage
Builds error message just like the originalSqlParseException
with special handling forParseException
class.This is customized implementation of the original
Throwable.getMessage()
. Any other underlyingSqlParseException
exception messages goes through without changesExample:
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.
- Overrides:
getMessage
in classThrowable
- Returns:
- formatted string representation of
DrillSqlParseException
-
getSqlWithErrorPointer
Formats sql query which caused the exception by adding error pointer ^ under incorrect expression.- Returns:
- The sql with a ^ character under the error
-