Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3932B200C5E for ; Fri, 7 Apr 2017 17:04:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 38170160B93; Fri, 7 Apr 2017 15:04:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 878B9160B97 for ; Fri, 7 Apr 2017 17:04:46 +0200 (CEST) Received: (qmail 89060 invoked by uid 500); 7 Apr 2017 15:04:45 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 89018 invoked by uid 99); 7 Apr 2017 15:04:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2017 15:04:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3677FC047D for ; Fri, 7 Apr 2017 15:04:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id XQar_jE1k-et for ; Fri, 7 Apr 2017 15:04:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 39F6C5FE07 for ; Fri, 7 Apr 2017 15:04:43 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AAA22E0D20 for ; Fri, 7 Apr 2017 15:04:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C95B624073 for ; Fri, 7 Apr 2017 15:04:41 +0000 (UTC) Date: Fri, 7 Apr 2017 15:04:41 +0000 (UTC) From: "Charles Givre (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5421) Allow Complex type as @Workspace variables for aggregate functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 07 Apr 2017 15:04:47 -0000 [ https://issues.apache.org/jira/browse/DRILL-5421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960934#comment-15960934 ] Charles Givre commented on DRILL-5421: -------------------------------------- I'd second this wish as well as I found this to be extremely limiting. I was working on implementing some statistics functions (median being one of them) and I needed a Stack in the @Workspace which did not work. I then tried serializing the Stack as either a JSON string or in Binary only to discover that you can't use varcharholders or varbinaryholders in the @Workspace either. :-( I was curious as to the reason for this restriction. > 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)