public class DrillSqlParseException
extends org.apache.calcite.sql.parser.SqlParseException
SqlParseException class| Constructor 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, getTokenImagesaddSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic 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 ParseException.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 ThrowableDrillSqlParseExceptionpublic String getSqlWithErrorPointer()
Copyright © 2021 The Apache Software Foundation. All rights reserved.