[ 
https://issues.apache.org/jira/browse/CALCITE-6491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17867629#comment-17867629
 ] 

xiong duan commented on CALCITE-6491:
-------------------------------------

If we want to test the Result we need to use TesterImpl(create a JDBC 
connection to execute the operator). Now we use the AbstractSqlTester(Only 
check the return type).

> OVERLAY test functions’ checkString doesn't check the actual value against 
> the expected result
> ----------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6491
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6491
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: xiong duan
>            Assignee: xiong duan
>            Priority: Major
>
> The Unit Test:
> {code:java}
> @Test void testOverlayFunc() {
>   final SqlOperatorFixture f = fixture();
>   f.setFor(SqlStdOperatorTable.OVERLAY, VmName.EXPAND);
>   f.checkString("overlay('ABCdef' placing 'abc' from 1)",
>       "abcd", "VARCHAR(9) NOT NULL");
> } {code}
> {code:java}
> @Test void testOverlayFunc() {
>   final SqlOperatorFixture f = fixture();
>   f.setFor(SqlStdOperatorTable.OVERLAY, VmName.EXPAND);
>   f.checkString("overlay('ABCdef' placing 'abc' from 1)",
>       "abcdef", "VARCHAR(9) NOT NULL");
> } {code}
> Both test cases can run successfully. I checked the code and the default 
> implementation only verifies the result type.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to