Package org.apache.calcite.sql.parser
Class SqlParserTest.UnparsingTesterImpl
java.lang.Object
org.apache.calcite.sql.parser.SqlParserTest.TesterImpl
org.apache.calcite.sql.parser.SqlParserTest.UnparsingTesterImpl
- All Implemented Interfaces:
SqlParserTest.Tester
- Enclosing class:
SqlParserTest
Implementation of
SqlParserTest.Tester
which makes sure that the results of
unparsing a query are consistent with the original query.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) 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) boolean
Whether this is a sub-class that tests un-parsing as well as parsing.Methods inherited from class org.apache.calcite.sql.parser.SqlParserTest.TesterImpl
checkEx, checkNode, parseExpressionAndHandleEx, parseStmtAndHandleEx, parseStmtsAndHandleEx
-
Constructor Details
-
UnparsingTesterImpl
public UnparsingTesterImpl()
-
-
Method Details
-
isUnparserTest
public boolean isUnparserTest()Description copied from interface:SqlParserTest.Tester
Whether this is a sub-class that tests un-parsing as well as parsing. -
checkList
public void checkList(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, List<String> expected) - Specified by:
checkList
in interfaceSqlParserTest.Tester
- Overrides:
checkList
in classSqlParserTest.TesterImpl
-
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
- Overrides:
check
in classSqlParserTest.TesterImpl
-
checkExp
public void checkExp(SqlTestFactory factory, StringAndPos sap, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) - Specified by:
checkExp
in interfaceSqlParserTest.Tester
- Overrides:
checkExp
in classSqlParserTest.TesterImpl
-
checkFails
public void checkFails(SqlTestFactory factory, StringAndPos sap, boolean list, String expectedMsgPattern) - Specified by:
checkFails
in interfaceSqlParserTest.Tester
- Overrides:
checkFails
in classSqlParserTest.TesterImpl
-
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
- Overrides:
checkExpFails
in classSqlParserTest.TesterImpl
-