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
Constructors -
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) booleanWhether 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.TesterWhether 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:
checkListin interfaceSqlParserTest.Tester- Overrides:
checkListin classSqlParserTest.TesterImpl
-
check
public void check(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) - Specified by:
checkin interfaceSqlParserTest.Tester- Overrides:
checkin classSqlParserTest.TesterImpl
-
checkExp
public void checkExp(SqlTestFactory factory, StringAndPos sap, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) - Specified by:
checkExpin interfaceSqlParserTest.Tester- Overrides:
checkExpin classSqlParserTest.TesterImpl
-
checkFails
public void checkFails(SqlTestFactory factory, StringAndPos sap, boolean list, String expectedMsgPattern) - Specified by:
checkFailsin interfaceSqlParserTest.Tester- Overrides:
checkFailsin classSqlParserTest.TesterImpl
-
checkExpFails
Description copied from interface:SqlParserTest.TesterTests that an expression throws an exception that matches the given pattern.- Specified by:
checkExpFailsin interfaceSqlParserTest.Tester- Overrides:
checkExpFailsin classSqlParserTest.TesterImpl
-