You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "lvshaokang (via GitHub)" <gi...@apache.org> on 2023/03/15 06:27:44 UTC
[GitHub] [doris] lvshaokang commented on issue #17806: [Feature] (array function) support array_cum_sum_noneg function #17474
lvshaokang commented on issue #17806:
URL: https://github.com/apache/doris/issues/17806#issuecomment-1469417711
Hi @Yukang-Lian , I found a description of this function in clickhouse[1], but it doesn't support null values in arrays, so I think we should discuss whether to handle `NULL` values, for example:
```
case 1. contains null & null as 0
SELECT array_cum_sum_noneg([1, NULL, -4, 1]) AS res
except: 1 1 0 1
case 2. contains null & null as null
SELECT array_cum_sum_noneg([1, NULL, -4, 1]) AS res
except: 1 NULL NULL NULL
case 3. contains null & throw unsupport exception
SELECT array_cum_sum_noneg([1, NULL, -4, 1]) AS res
except: throw unsupport exception
```
so, what do you think of which case more reasonable?
[1] https://clickhouse.com/docs/en/sql-reference/functions/array-functions/#arraycumsumnonnegativearr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org