[
https://issues.apache.org/jira/browse/DRILL-5421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966075#comment-15966075
]
Manuel Aristaran commented on DRILL-5421:
-----------------------------------------
Hi [~cgivre],
I posted about this on the users mailing list. Someone pointed out that an
{{ObjectHolder}} can be used as a {{@Workspace}} variable. That should help you
implementing statistical functions, as they have a numeric return type.
Link:
http://mail-archives.apache.org/mod_mbox/drill-user/201704.mbox/%3CCAJrw0OSO1p8k%2Bkescd2ismjVngBidhgf8dv2KMm8Wopfk5Bw4A%40mail.gmail.com%3E
> Allow Complex type as @Workspace variables for aggregate functions
> ------------------------------------------------------------------
>
> Key: DRILL-5421
> URL: https://issues.apache.org/jira/browse/DRILL-5421
> Project: Apache Drill
> Issue Type: Wish
> Components: Functions - Drill
> Affects Versions: 1.10.0
> Reporter: Manuel Aristaran
>
> I'm trying to implement the equivalent of Postgres' {{array_agg()}} as a UDF
> in Drill. Unless I'm missing something, this doesn't seem to be possible. As
> per [the
> documentation|https://drill.apache.org/docs/developing-an-aggregate-function/]:
> {quote}
> Do not use complex @Workspace variables.
> You cannot allocate a Repeated* value or have a ComplexWriter in the
> @Workspace.
> {quote}
> With that restriction, it's not possible to keep the intermediate value of
> the resulting array during computation of the aggregation.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)