zstan commented on PR #3211:
URL: https://github.com/apache/calcite/pull/3211#issuecomment-1582057564
@herunkang2018 thanks ! i check
```
@Test
void testStrcmpFunc() {
final SqlOperatorFixture f = fixture()
.setFor(SqlLibraryOperators.STRCMP)
.withLibrary(SqlLibrary.MYSQL);
f.checkNull("STRCMP(null, null)");
```
and what kind of runtine it generates for null literals
`EnumerableCalc#implement`
and i check my PR change for SUBSTRING and as for me it looks the same (for
now) i.e. did the same as from java doc :
```
If any of the other operands are nullable the
* returned type will also be nullable. First Arg must be of string type.
*/
public static final SqlReturnTypeInference ARG0_NULLABLE_VARYING =
ARG0.andThen(SqlTypeTransforms.TO_NULLABLE)
.andThen(SqlTypeTransforms.TO_VARYING);
```
i.e. for null literals appropriate runtime implementation will never been
called, seems it correct.
--
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]