Package org.apache.calcite.sql.test
Class ResultCheckers
java.lang.Object
org.apache.calcite.sql.test.ResultCheckers
Utilities for
SqlTester.ResultChecker
.-
Method Summary
Modifier and TypeMethodDescriptionstatic SqlTester.ResultChecker
createChecker
(Object result) Creates a ResultChecker from an expected result.static <T> SqlTester.ResultChecker
createChecker
(org.hamcrest.Matcher<T> matcher, JdbcType<T> jdbcType) Creates a ResultChecker that accesses a column of a given type and then uses a Hamcrest matcher to check the value.static SqlTester.ResultChecker
static SqlTester.ResultChecker
isExactDateTime
(LocalDateTime dateTime) static SqlTester.ResultChecker
isExactly
(double value) static SqlTester.ResultChecker
static SqlTester.ResultChecker
isExactTime
(LocalTime time) static SqlTester.ResultChecker
static SqlTester.ResultChecker
static SqlTester.ResultChecker
isSingle
(boolean value) static SqlTester.ResultChecker
static SqlTester.ResultChecker
isSingle
(int value) static SqlTester.ResultChecker
static SqlTester.ResultChecker
isWithin
(double value, double delta)
-
Method Details
-
isExactly
-
isExactly
-
isExactDateTime
-
isExactTime
-
isWithin
-
isSingle
-
isSingle
-
isSingle
-
isSingle
-
isDecimal
-
isSet
-
isNullValue
-
createChecker
public static <T> SqlTester.ResultChecker createChecker(org.hamcrest.Matcher<T> matcher, JdbcType<T> jdbcType) Creates a ResultChecker that accesses a column of a given type and then uses a Hamcrest matcher to check the value. -
createChecker
Creates a ResultChecker from an expected result.The result may be a
SqlTester.ResultChecker
, a regular expression (Pattern
), a HamcrestMatcher
, aCollection
of strings (representing the values of one column).If none of the above, the value is converted to a string and compared with the value of a single column, single row result set that is converted to a string.
-