Class SqlAdvisor.ValidateErrorInfo

java.lang.Object
org.apache.calcite.sql.advise.SqlAdvisor.ValidateErrorInfo
Enclosing class:
SqlAdvisor

public static class SqlAdvisor.ValidateErrorInfo extends Object
Text and position info of a validator or parser exception.
  • Constructor Details

    • ValidateErrorInfo

      public ValidateErrorInfo(int startLineNum, int startColumnNum, int endLineNum, int endColumnNum, @Nullable String errorMsg)
      Creates a new ValidateErrorInfo with the position coordinates and an error string.
      Parameters:
      startLineNum - Start line number
      startColumnNum - Start column number
      endLineNum - End line number
      endColumnNum - End column number
      errorMsg - Error message
    • ValidateErrorInfo

      public ValidateErrorInfo(CalciteContextException e)
      Creates a new ValidateErrorInfo with an CalciteContextException.
      Parameters:
      e - Exception
    • ValidateErrorInfo

      public ValidateErrorInfo(SqlParserPos pos, @Nullable String errorMsg)
      Creates a new ValidateErrorInfo with a SqlParserPos and an error string.
      Parameters:
      pos - Error position
      errorMsg - Error message
  • Method Details

    • getStartLineNum

      public int getStartLineNum()
      Returns 1-based starting line number.
    • getStartColumnNum

      public int getStartColumnNum()
      Returns 1-based starting column number.
    • getEndLineNum

      public int getEndLineNum()
      Returns 1-based end line number.
    • getEndColumnNum

      public int getEndColumnNum()
      Returns 1-based end column number.
    • getMessage

      public @Nullable String getMessage()
      Returns the error message.