[
https://issues.apache.org/jira/browse/CALCITE-7262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035060#comment-18035060
]
Thomas Rebele commented on CALCITE-7262:
----------------------------------------
The checks are actually done by CalciteSqlOperatorTest. I should have checked
the javadoc of SqlOperatorTest:
{code:java}
* <p>To run, you also need an execution mechanism: parse, validate, and execute
* expressions on the operators. This is left to a {@link SqlTester} object
* which is obtained via the {@link #fixture()} method. The default tester
* merely validates calls to operators, but {@code CalciteSqlOperatorTest}
* uses a tester that executes calls and checks that results are valid. {code}
> Some SqlOperatorFixture methods do not check the result
> -------------------------------------------------------
>
> Key: CALCITE-7262
> URL: https://issues.apache.org/jira/browse/CALCITE-7262
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.41.0
> Reporter: Thomas Rebele
> Priority: Major
>
> The following statements (added to SqlOperatorTest) fail only at the last
> line.
> {code:java}
> f0.checkScalar("1+1", 3, "INTEGER NOT NULL");
> f0.checkScalar("1.0 / 1.0", 3.0, "DECIMAL(8, 6) NOT NULL");
> f0.checkScalarExact("1+1", "INTEGER NOT NULL", "3");
> f0.checkScalarExact("1.0 / 1.0", "DECIMAL(8, 6) NOT NULL", "3");
> f0.checkFails("1.0 / 1.0", "/ by zero", true);
> fail("something is wrong here");{code}
> The method org.apache.calcite.sql.test.AbstractSqlTester#check does not use
> the resultChecker argument.
> The method org.apache.calcite.sql.test.AbstractSqlTester#checkFails only
> validates the expression, but does not execute it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)