Package org.apache.calcite.sql.parser
Class SqlParserTest.TesterImpl
java.lang.Object
org.apache.calcite.sql.parser.SqlParserTest.TesterImpl
- All Implemented Interfaces:
SqlParserTest.Tester
- Direct Known Subclasses:
SqlParserTest.UnparsingTesterImpl
- Enclosing class:
SqlParserTest
Default implementation of
SqlParserTest.Tester
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) protected void
checkEx
(String expectedMsgPattern, StringAndPos sap, @Nullable Throwable thrown) void
checkExp
(SqlTestFactory factory, StringAndPos sap, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) void
checkExpFails
(SqlTestFactory factory, StringAndPos sap, String expectedMsgPattern) Tests that an expression throws an exception that matches the given pattern.void
checkFails
(SqlTestFactory factory, StringAndPos sap, boolean list, String expectedMsgPattern) void
checkList
(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, List<String> expected) void
checkNode
(SqlTestFactory factory, StringAndPos sap, org.hamcrest.Matcher<SqlNode> matcher) protected SqlNode
parseExpressionAndHandleEx
(SqlTestFactory factory, String sql, Consumer<SqlParser> parserChecker) protected SqlNode
parseStmtAndHandleEx
(SqlTestFactory factory, String sql, Consumer<SqlParser> parserChecker) protected SqlNodeList
parseStmtsAndHandleEx
(SqlTestFactory factory, String sql) Parses a list of statements.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.calcite.sql.parser.SqlParserTest.Tester
isUnparserTest
-
Constructor Details
-
TesterImpl
protected TesterImpl()
-
-
Method Details
-
checkList
public void checkList(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, List<String> expected) - Specified by:
checkList
in interfaceSqlParserTest.Tester
-
check
public void check(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) - Specified by:
check
in interfaceSqlParserTest.Tester
-
parseStmtAndHandleEx
protected SqlNode parseStmtAndHandleEx(SqlTestFactory factory, String sql, Consumer<SqlParser> parserChecker) -
parseStmtsAndHandleEx
Parses a list of statements. -
checkExp
public void checkExp(SqlTestFactory factory, StringAndPos sap, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) - Specified by:
checkExp
in interfaceSqlParserTest.Tester
-
parseExpressionAndHandleEx
protected SqlNode parseExpressionAndHandleEx(SqlTestFactory factory, String sql, Consumer<SqlParser> parserChecker) -
checkFails
public void checkFails(SqlTestFactory factory, StringAndPos sap, boolean list, String expectedMsgPattern) - Specified by:
checkFails
in interfaceSqlParserTest.Tester
-
checkNode
public void checkNode(SqlTestFactory factory, StringAndPos sap, org.hamcrest.Matcher<SqlNode> matcher) - Specified by:
checkNode
in interfaceSqlParserTest.Tester
-
checkExpFails
Description copied from interface:SqlParserTest.Tester
Tests that an expression throws an exception that matches the given pattern.- Specified by:
checkExpFails
in interfaceSqlParserTest.Tester
-
checkEx
-