[jira] [Commented] (CALCITE-4607) mandatory feature of SQL 2003 standard (F481, Expanded NULL predicate) is missing

2021-05-18 Thread Alexander Vasiljev (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17347312#comment-17347312
 ] 

Alexander Vasiljev commented on CALCITE-4607:
-

Thanks for COALESCE tip. I've changed Jira subject. Is it better now?

> mandatory feature of SQL 2003 standard (F481, Expanded NULL predicate) is 
> missing
> -
>
> 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)


[jira] [Commented] (CALCITE-4607) Mandatory feature of SQL 2003 standard (F481, Expanded NULL predicate) is missing

2021-05-19 Thread Julian Hyde (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17347738#comment-17347738
 ] 

Julian Hyde commented on CALCITE-4607:
--

Only a bit better. Remember, this subject will be in the release notes. I 
suggest “ROW(a, b, ... z) IS NULL should be TRUE if any field is null”. 



> Mandatory feature of SQL 2003 standard (F481, Expanded NULL predicate) is 
> missing
> -
>
> 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)