[
https://issues.apache.org/jira/browse/CALCITE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Vasiljev updated CALCITE-4607:
----------------------------------------
Summary: ROW(a, b, ... z) IS NULL should be TRUE if every field is null
(was: Mandatory feature of SQL 2003 standard (F481, Expanded NULL predicate) is
missing)
> ROW(a, b, ... z) IS NULL should be TRUE if every field is null
> --------------------------------------------------------------
>
> Key: CALCITE-4607
> URL: https://issues.apache.org/jira/browse/CALCITE-4607
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.26.0
> Reporter: Alexander Vasiljev
> Priority: Major
>
> There is "Expanded NULL predicate" (F481) in SQL 2003 (ISO/IEC 9075-2:2003)
> feature taxonomy. Currently the feature is not implemented in Apache Calcite
> as failing test shows.
> See PR#2414 ([https://github.com/apache/calcite/pull/2414]).
> e.g. query
> {code:sql}
> select a, b, c
> from (
> select 11 as a, 12 as b, 13 as c
> union
> select 21 as a2, null as b2, null as c2
> union
> select null as a3, 32 as b3, null as c3
> union
> select null as a4, null as b4, 43 as c4
> ) as t
> WHERE ROW(a, b) IS NOT NULL
> {code}
> shoud return
> {noformat}
> a | b | c
> ----+----+----
> 11 | 12 | 13
> {noformat}
> while query
> {code:sql}
> select a, b, c
> from (
> select 11 as a, 12 as b, 13 as c
> union
> select 21 as a2, null as b2, null as c2
> union
> select null as a3, 32 as b3, null as c3
> union
> select null as a4, null as b4, 43 as c4
> ) as t
> WHERE ROW(a, b) IS NULL
> {code}
> shoud return
> {noformat}
> a | b | c
> ---+---+----
> | | 43
> {noformat}
> N.B.: {{ROW}} keyword is not a part of strict SQL 2003 and added for clarity.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)