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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) protected voidcheckEx(String expectedMsgPattern, StringAndPos sap, @Nullable Throwable thrown) 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) protected SqlNodeparseExpressionAndHandleEx(SqlTestFactory factory, String sql, Consumer<SqlParser> parserChecker) protected SqlNodeparseStmtAndHandleEx(SqlTestFactory factory, String sql, Consumer<SqlParser> parserChecker) protected SqlNodeListparseStmtsAndHandleEx(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, waitMethods 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:
checkListin interfaceSqlParserTest.Tester
-
check
public void check(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) - Specified by:
checkin 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:
checkExpin 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:
checkFailsin interfaceSqlParserTest.Tester
-
checkNode
public void checkNode(SqlTestFactory factory, StringAndPos sap, org.hamcrest.Matcher<SqlNode> matcher) - Specified by:
checkNodein interfaceSqlParserTest.Tester
-
checkExpFails
Description copied from interface:SqlParserTest.TesterTests that an expression throws an exception that matches the given pattern.- Specified by:
checkExpFailsin interfaceSqlParserTest.Tester
-
checkEx
-