Class ErrorCollectorImpl
java.lang.Object
org.apache.drill.common.expression.ErrorCollectorImpl
- All Implemented Interfaces:
ErrorCollector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpectedConstantValue(ExpressionPosition expr, int actual, String s) voidaddGeneralError(ExpressionPosition expr, String s) voidaddNonNumericType(ExpressionPosition expr, TypeProtos.MajorType actual) voidaddUnexpectedArgumentCount(ExpressionPosition expr, int actual, int expected) voidaddUnexpectedArgumentCount(ExpressionPosition expr, int actual, com.google.common.collect.Range<Integer> expected) voidaddUnexpectedArgumentType(ExpressionPosition expr, String name, TypeProtos.MajorType actual, TypeProtos.MajorType[] expected, int argumentIndex) voidaddUnexpectedType(ExpressionPosition expr, int index, TypeProtos.MajorType actual) intbooleanvoidreportErrors(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:
addGeneralErrorin interfaceErrorCollector
-
addUnexpectedArgumentType
public void addUnexpectedArgumentType(ExpressionPosition expr, String name, TypeProtos.MajorType actual, TypeProtos.MajorType[] expected, int argumentIndex) - Specified by:
addUnexpectedArgumentTypein interfaceErrorCollector
-
addUnexpectedArgumentCount
public void addUnexpectedArgumentCount(ExpressionPosition expr, int actual, com.google.common.collect.Range<Integer> expected) - Specified by:
addUnexpectedArgumentCountin interfaceErrorCollector
-
addUnexpectedArgumentCount
- Specified by:
addUnexpectedArgumentCountin interfaceErrorCollector
-
addNonNumericType
- Specified by:
addNonNumericTypein interfaceErrorCollector
-
addUnexpectedType
- Specified by:
addUnexpectedTypein interfaceErrorCollector
-
addExpectedConstantValue
- Specified by:
addExpectedConstantValuein interfaceErrorCollector
-
hasErrors
public boolean hasErrors()- Specified by:
hasErrorsin interfaceErrorCollector
-
getErrorCount
public int getErrorCount()- Specified by:
getErrorCountin interfaceErrorCollector
-
toErrorString
- Specified by:
toErrorStringin interfaceErrorCollector
-
toString
-
reportErrors
public void reportErrors(org.slf4j.Logger logger) Description copied from interface:ErrorCollectorChecks 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:
reportErrorsin interfaceErrorCollector- Parameters:
logger-
-