Package org.apache.drill.common.expression.visitors

Examples of org.apache.drill.common.expression.visitors.ExpressionValidationError


        return String.format("Error in expression at index %d.  Error: %s.  Full expression: %s.", expr.getCharIndex(), message, expr.getExpression());
    }

    @Override
    public void addGeneralError(ExpressionPosition expr, String s) {
        errors.add(new ExpressionValidationError(addExpr(expr, s)));
    }
View Full Code Here


    }

    @Override
    public void addUnexpectedArgumentType(ExpressionPosition expr, String name, MajorType actual, MajorType[] expected, int argumentIndex) {
        errors.add(
                new ExpressionValidationError(
                        addExpr(expr, String.format(
                                "Unexpected argument type. Index :%d Name: %s, Type: %s, Expected type(s): %s",
                                argumentIndex, name, actual, Arrays.toString(expected)
                        ))
                )
View Full Code Here

        );
    }

    @Override
    public void addUnexpectedArgumentCount(ExpressionPosition expr, int actual, Range<Integer> expected) {
        errors.add(new ExpressionValidationError(
                addExpr(expr, String.format("Unexpected argument count. Actual argument count: %d, Expected range: %s", actual, expected))
        ));
    }
View Full Code Here

        ));
    }

    @Override
    public void addUnexpectedArgumentCount(ExpressionPosition expr, int actual, int expected) {
        errors.add(new ExpressionValidationError(
                addExpr(expr, String.format("Unexpected argument count. Actual argument count: %d, Expected count: %d", actual, expected))
        ));
    }
View Full Code Here

        ));
    }

    @Override
    public void addNonNumericType(ExpressionPosition expr, MajorType actual) {
        errors.add(new ExpressionValidationError(
                addExpr(expr, String.format("Unexpected numeric type. Actual type: %s", actual))
        ));
    }
View Full Code Here

        ));
    }

    @Override
    public void addUnexpectedType(ExpressionPosition expr, int index, MajorType actual) {
        errors.add(new ExpressionValidationError(
                addExpr(expr, String.format("Unexpected argument type. Actual type: %s, Index: %d", actual, index))
        ));
    }
View Full Code Here

        ));
    }

    @Override
    public void addExpectedConstantValue(ExpressionPosition expr, int actual, String s) {
        errors.add(new ExpressionValidationError(
                addExpr(expr, String.format("Unexpected constant value. Name: %s, Actual: %s", s, actual))
        ));
    }
View Full Code Here

        return String.format("Error in expression at index %d.  Error: %s.  Full expression: %s.", expr.getCharIndex(), message, expr.getExpression());
    }

    @Override
    public void addGeneralError(ExpressionPosition expr, String s) {
        errors.add(new ExpressionValidationError(addExpr(expr, s)));
    }
View Full Code Here

    }

    @Override
    public void addUnexpectedArgumentType(ExpressionPosition expr, String name, MajorType actual, MajorType[] expected, int argumentIndex) {
        errors.add(
                new ExpressionValidationError(
                        addExpr(expr, String.format(
                                "Unexpected argument type. Index :%d Name: %s, Type: %s, Expected type(s): %s",
                                argumentIndex, name, actual, Arrays.toString(expected)
                        ))
                )
View Full Code Here

        );
    }

    @Override
    public void addUnexpectedArgumentCount(ExpressionPosition expr, int actual, Range<Integer> expected) {
        errors.add(new ExpressionValidationError(
                addExpr(expr, String.format("Unexpected argument count. Actual argument count: %d, Expected range: %s", actual, expected))
        ));
    }
View Full Code Here

TOP

Related Classes of org.apache.drill.common.expression.visitors.ExpressionValidationError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.