Package org.apache.calcite.sql.parser
Interface SqlParserTest.Tester
- All Known Implementing Classes:
SqlParserTest.TesterImpl,SqlParserTest.UnparsingTesterImpl
- Enclosing class:
SqlParserTest
protected static interface SqlParserTest.Tester
Callback to control how test actions are performed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) voidcheckExp(SqlTestFactory factory, StringAndPos sap, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) voidcheckExpFails(SqlTestFactory factory, StringAndPos sap, String expectedMsgPattern) Tests that an expression throws an exception that matches the given pattern.voidcheckFails(SqlTestFactory factory, StringAndPos sap, boolean list, String expectedMsgPattern) voidcheckList(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, List<String> expected) voidcheckNode(SqlTestFactory factory, StringAndPos sap, org.hamcrest.Matcher<SqlNode> matcher) default booleanWhether this is a sub-class that tests un-parsing as well as parsing.
-
Method Details
-
checkList
void checkList(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, List<String> expected) -
check
void check(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) -
checkExp
void checkExp(SqlTestFactory factory, StringAndPos sap, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) -
checkFails
-
checkExpFails
Tests that an expression throws an exception that matches the given pattern. -
checkNode
-
isUnparserTest
default boolean isUnparserTest()Whether this is a sub-class that tests un-parsing as well as parsing.
-