liuyongvs commented on PR #3161:
URL: https://github.com/apache/calcite/pull/3161#issuecomment-1533962959
> @liuyongvs Do you know why the unit test cannot check result?
>
> ```
> f.checkScalar("array_distinct(array[1, 2, 2, 1])", "[1]",
> "INTEGER NOT NULL ARRAY NOT NULL");
> ```
>
> It also success, but I expect it fail.
>
>
[AbstractSqlTester#check](https://github.com/apache/calcite/blob/3326475c766267d521330006cc80730c4e456191/testkit/src/main/java/org/apache/calcite/sql/test/AbstractSqlTester.java#L225)
not use resultChecker.
you can use this, the default unit test just check type, and the itcase will
check the result, this is for less time to run the tests
final SqlOperatorFixture f = Fixtures.forOperators(true)
.setFor(SqlLibraryOperators.XXX)
.withLibrary(SqlLibrary.SPARK);
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]