Class ErrorCollectorImpl
java.lang.Object
org.apache.drill.common.expression.ErrorCollectorImpl
- All Implemented Interfaces:
ErrorCollector
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExpectedConstantValue
(ExpressionPosition expr, int actual, String s) void
addGeneralError
(ExpressionPosition expr, String s) void
addNonNumericType
(ExpressionPosition expr, TypeProtos.MajorType actual) void
addUnexpectedArgumentCount
(ExpressionPosition expr, int actual, int expected) void
addUnexpectedArgumentCount
(ExpressionPosition expr, int actual, org.apache.drill.shaded.guava.com.google.common.collect.Range<Integer> expected) void
addUnexpectedArgumentType
(ExpressionPosition expr, String name, TypeProtos.MajorType actual, TypeProtos.MajorType[] expected, int argumentIndex) void
addUnexpectedType
(ExpressionPosition expr, int index, TypeProtos.MajorType actual) int
boolean
void
reportErrors
(org.slf4j.Logger logger) Checks for errors and throws a user exception if any are found.toString()
-
Constructor Details
-
ErrorCollectorImpl
public ErrorCollectorImpl()
-
-
Method Details
-
addGeneralError
- Specified by:
addGeneralError
in interfaceErrorCollector
-
addUnexpectedArgumentType
public void addUnexpectedArgumentType(ExpressionPosition expr, String name, TypeProtos.MajorType actual, TypeProtos.MajorType[] expected, int argumentIndex) - Specified by:
addUnexpectedArgumentType
in interfaceErrorCollector
-
addUnexpectedArgumentCount
public void addUnexpectedArgumentCount(ExpressionPosition expr, int actual, org.apache.drill.shaded.guava.com.google.common.collect.Range<Integer> expected) - Specified by:
addUnexpectedArgumentCount
in interfaceErrorCollector
-
addUnexpectedArgumentCount
- Specified by:
addUnexpectedArgumentCount
in interfaceErrorCollector
-
addNonNumericType
- Specified by:
addNonNumericType
in interfaceErrorCollector
-
addUnexpectedType
- Specified by:
addUnexpectedType
in interfaceErrorCollector
-
addExpectedConstantValue
- Specified by:
addExpectedConstantValue
in interfaceErrorCollector
-
hasErrors
public boolean hasErrors()- Specified by:
hasErrors
in interfaceErrorCollector
-
getErrorCount
public int getErrorCount()- Specified by:
getErrorCount
in interfaceErrorCollector
-
toErrorString
- Specified by:
toErrorString
in interfaceErrorCollector
-
toString
-
reportErrors
public void reportErrors(org.slf4j.Logger logger) Description copied from interface:ErrorCollector
Checks for errors and throws a user exception if any are found. The caller thus need not implement its own error checking; just call this method.- Specified by:
reportErrors
in interfaceErrorCollector
-