You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/09/07 20:05:00 UTC
[jira] [Created] (CALCITE-4236) Clarify if nulls are permissible to
return from .SqlOperator#inferReturnType
Vladimir Sitnikov created CALCITE-4236:
------------------------------------------
Summary: Clarify if nulls are permissible to return from .SqlOperator#inferReturnType
Key: CALCITE-4236
URL: https://issues.apache.org/jira/browse/CALCITE-4236
Project: Calcite
Issue Type: Sub-task
Components: core
Affects Versions: 1.25.0
Reporter: Vladimir Sitnikov
1) Javadoc for {{SqlOperator#inferReturnType}} does not say if nulls are allowed
2) The default implementation throws exception if {{returnTypeInference}} is missing, and it throws exception in case {{returnTypeInference.inferReturnType(opBinding)}} returns {{null}}.
3) Some of the operators can return null. For instance, {{SqlMultisetQueryConstructor}} has {{if (...) return null}} (which might happen to be never executed)
It looks like we need to add "never null" tp the javadoc of {{SqlOperator#inferReturnType}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)