You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chunwei Lei (Jira)" <ji...@apache.org> on 2019/12/04 02:35:00 UTC
[jira] [Resolved] (CALCITE-3355) Deduce whether CASE and COALESCE
may produce NULL values
[ https://issues.apache.org/jira/browse/CALCITE-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chunwei Lei resolved CALCITE-3355.
----------------------------------
Fix Version/s: 1.22.0
Resolution: Fixed
Fixed in [abe7729fb1d6e9b9cfbe4cf498806f67991b618e|https://github.com/apache/calcite/commit/abe7729fb1d6e9b9cfbe4cf498806f67991b618e].
> Deduce whether CASE and COALESCE may produce NULL values
> --------------------------------------------------------
>
> Key: CALCITE-3355
> URL: https://issues.apache.org/jira/browse/CALCITE-3355
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.20.0
> Reporter: Kirill Kozlov
> Assignee: Chunwei Lei
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.22.0
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> When executing queries like:
> "SELECT COALESCE(name, 'unknown') as name_out FROM PCOLLECTION"
> (input 'name' is nullable)
> There is a need to know whether the result is nullable or not (in this case - not). During validation stage "COALESCE" is being transformed (via SqlValidatorImpl.performUnconditionalRewrites) into a "CASE" statement, which currently does not determine nullability of a result.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)