[
https://issues.apache.org/jira/browse/CALCITE-3504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17750737#comment-17750737
]
Stamatis Zampetakis commented on CALCITE-3504:
----------------------------------------------
For the record the SQL standard does not allow an ARRAY constructor with an
empty element list.
{noformat}
<array value constructor> ::= <array value constructor by enumeration> | <array
value constructor by query>
<array value constructor by enumeration> ::= ARRAY <left bracket or trigraph>
<array element list> <right bracket or trigraph>
<array element list> ::= <array element> [ { <comma> <array element> }... ]
<array element> ::= <value expression>
<array value constructor by query> ::= ARRAY <table subquery>
{noformat}
> Allow empty ARRAY[] constructors
> --------------------------------
>
> Key: CALCITE-3504
> URL: https://issues.apache.org/jira/browse/CALCITE-3504
> Project: Calcite
> Issue Type: Wish
> Affects Versions: 1.21.0
> Reporter: Pressenna
> Priority: Major
>
> Currently an ARRAY expression requires at least one element.
> Please allow empty ARRAY expressions.
> {code:sql}
> SELECT ARRAY[] FROM foo;
> -- or more concise for updates:
> UPDATE food set array_column = ARRAY[];
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)