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

Jiabao Sun commented on CALCITE-6008:
-------------------------------------

Hi [~julianhyde].
I made some tests, and other functions such as STRING_AGG, GROUP_CONCAT and 
ARRAY_CONCAT_AGG can correctly infer the return value types nullable.
Could you help review it when you have time?

> ARRAY_AGG should returns ARRAY NULL when there's no input rows
> --------------------------------------------------------------
>
>                 Key: CALCITE-6008
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6008
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.35.0
>            Reporter: Jiabao Sun
>            Assignee: Jiabao Sun
>            Priority: Major
>              Labels: pull-request-available
>
> ARRAY_AGG in BigQuery and Postgres returns NULL if there are zero input rows 
> or expression evaluates to NULL for all rows.
> However, it will return `ARRAY<arg0> NOT NULL` in the return type of the 
> function definition.
> [https://cloud.google.com/bigquery/docs/reference/standard-sql/aggregate_functions#array_agg]
> [https://www.postgresql.org/docs/8.4/functions-aggregate.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to