xiong duan created CALCITE-6491:
-----------------------------------

             Summary: SqlOperatorFixture's 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


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