/** * Creates a new ValidateErrorInfo with a SqlParserPos and an error * string. * * @param pos Error position * @param errorMsg Error message */ public ValidateErrorInfo( SqlParserPos pos, String errorMsg) { this.startLineNum = pos.getLineNum(); this.startColumnNum = pos.getColumnNum(); this.endLineNum = pos.getEndLineNum(); this.endColumnNum = pos.getEndColumnNum(); this.errorMsg = errorMsg; }
/** * Creates a new ValidateErrorInfo with a SqlParserPos and an error * string. * * @param pos Error position * @param errorMsg Error message */ public ValidateErrorInfo( SqlParserPos pos, String errorMsg) { this.startLineNum = pos.getLineNum(); this.startColumnNum = pos.getColumnNum(); this.endLineNum = pos.getEndLineNum(); this.endColumnNum = pos.getEndColumnNum(); this.errorMsg = errorMsg; }
/** * Combines this parser position with another to create a position which * spans from the first point in the first to the last point in the other. */ public SqlParserPos plus(SqlParserPos pos) { return new SqlParserPos( getLineNum(), getColumnNum(), pos.getEndLineNum(), pos.getEndColumnNum()); }
/** * Wraps an exception with context. */ public static EigenbaseContextException newContextException( final SqlParserPos pos, Resources.ExInst<?> e) { int line = pos.getLineNum(); int col = pos.getColumnNum(); int endLine = pos.getEndLineNum(); int endCol = pos.getEndColumnNum(); return newContextException(line, col, endLine, endCol, e); }
/** * Wraps an exception with context. */ public static EigenbaseException newContextException( final SqlParserPos pos, Throwable e) { int line = pos.getLineNum(); int col = pos.getColumnNum(); int endLine = pos.getEndLineNum(); int endCol = pos.getEndColumnNum(); return newContextException(line, col, endLine, endCol, e); }
/** * Combines this parser position with an array of positions to create a * position which spans from the first point in the first to the last point * in the other. */ public SqlParserPos plusAll(SqlNode [] nodes) { int line = getLineNum(); int column = getColumnNum(); int endLine = getEndLineNum(); int endColumn = getEndColumnNum(); return sum(nodes, line, column, endLine, endColumn); }
/** * Combines this parser position with another to create a position which * spans from the first point in the first to the last point in the other. */ public SqlParserPos plus(SqlParserPos pos) { return new SqlParserPos( getLineNum(), getColumnNum(), pos.getEndLineNum(), pos.getEndColumnNum()); }
/** * Combines this parser position with an array of positions to create a * position which spans from the first point in the first to the last point * in the other. */ public SqlParserPos plusAll(SqlNode[] nodes) { int line = getLineNum(); int column = getColumnNum(); int endLine = getEndLineNum(); int endColumn = getEndColumnNum(); return sum(nodes, line, column, endLine, endColumn); }
final int x = pos.getColumnNum() - 1; sql = sql.substring(0, x) + " \07"
final int x = pos.getColumnNum() - 1; sql = sql.substring(0, x) + " \07"
public int compare(SqlNode o1, SqlNode o2) { final SqlParserPos pos0 = o1.getParserPosition(); final SqlParserPos pos1 = o2.getParserPosition(); int c = -Utilities.compare( pos0.getLineNum(), pos1.getLineNum()); if (c != 0) { return c; } return -Utilities.compare( pos0.getColumnNum(), pos1.getColumnNum()); } });
testColumn = pos.getColumnNum(); if (testLine < line || testLine == line && testColumn < column) { line = testLine;
testColumn = pos.getColumnNum(); if (testLine < line || testLine == line && testColumn < column) { line = testLine;
final int start = SqlParserUtil.lineColToIndex( sql, pos.getLineNum(), pos.getColumnNum()); final int end = SqlParserUtil.lineColToIndex(
actualColumn = spe.getPos().getColumnNum(); actualEndLine = spe.getPos().getEndLineNum(); actualEndColumn = spe.getPos().getEndColumnNum(); (sap.pos != null) && ((actualLine != sap.pos.getLineNum()) || (actualColumn != sap.pos.getColumnNum()) || (actualEndLine != sap.pos.getEndLineNum()) || (actualEndColumn != sap.pos.getEndColumnNum())))
actualColumn = spe.getPos().getColumnNum(); actualEndLine = spe.getPos().getEndLineNum(); actualEndColumn = spe.getPos().getEndColumnNum(); (sap.pos != null) && ((actualLine != sap.pos.getLineNum()) || (actualColumn != sap.pos.getColumnNum()) || (actualEndLine != sap.pos.getEndLineNum()) || (actualEndColumn != sap.pos.getEndColumnNum()))) {
protected void validateFeature( ResourceDefinition feature, SqlParserPos context) { if (feature == disabledFeature) { EigenbaseException ex = new EigenbaseException( FEATURE_DISABLED, null); if (context == null) { throw ex; } throw new EigenbaseContextException( "location", ex, context.getLineNum(), context.getColumnNum(), context.getEndLineNum(), context.getEndColumnNum()); } } }
testColumn = pos.getColumnNum(); if ((testLine < line) || ((testLine == line) && (testColumn < column))) testColumn = pos.getColumnNum(); if ((testLine < line) || ((testLine == line) && (testColumn < column)))
protected void validateFeature( Feature feature, SqlParserPos context) { if (feature.equals(disabledFeature)) { EigenbaseException ex = new EigenbaseException( FEATURE_DISABLED, null); if (context == null) { throw ex; } throw new EigenbaseContextException( "location", ex, context.getLineNum(), context.getColumnNum(), context.getEndLineNum(), context.getEndColumnNum()); } } }