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 F3A91200CD7 for ; Tue, 1 Aug 2017 19:14:39 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F2415167951; Tue, 1 Aug 2017 17:14:39 +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 4407A167950 for ; Tue, 1 Aug 2017 19:14:39 +0200 (CEST) Received: (qmail 37520 invoked by uid 500); 1 Aug 2017 17:14:38 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 37509 invoked by uid 99); 1 Aug 2017 17:14:38 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2017 17:14:38 +0000 Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com [209.85.216.174]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 4F0F71A02C0 for ; Tue, 1 Aug 2017 17:14:37 +0000 (UTC) Received: by mail-qt0-f174.google.com with SMTP id 16so12944409qtz.4 for ; Tue, 01 Aug 2017 10:14:36 -0700 (PDT) X-Gm-Message-State: AIVw110/Wn1H3vSV7RM6a8atuVoKkIbpmDHqXh2gAv2yOLNemjL21oZf 3HOg7t3HJIBrlH/BHKa85VREssQTKw== X-Received: by 10.200.42.107 with SMTP id l40mr29447801qtl.260.1501607675740; Tue, 01 Aug 2017 10:14:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.57.102 with HTTP; Tue, 1 Aug 2017 10:14:35 -0700 (PDT) In-Reply-To: References: From: Preston Carman Date: Tue, 1 Aug 2017 10:14:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Aggregate functions again To: dev@asterixdb.apache.org Content-Type: text/plain; charset="UTF-8" archived-at: Tue, 01 Aug 2017 17:14:40 -0000 Here is an old commit adding SQL aggregate functions. https://github.com/apache/asterixdb/commit/789eee2b57f85f47784b4fcc73567afbad67feb1 Is this helpful? On Tue, Aug 1, 2017 at 9:23 AM, Ahmed Eldawy wrote: > Hi Riyafa, > > Can you please clarify what errors you got with your implementation? Is it > a compilation error or a runtime error? If it is a runtime error, please > share the query that you are trying to run and what the error is. > > Thanks > Ahmed > > On Mon, Jul 31, 2017 at 4:13 AM, Riyafa Abdul Hameed < > riyafa.12@cse.mrt.ac.lk> wrote: > >> Hi all, >> If someone could at least mention the newest aggregate function created if >> any that would be of great help. Then I can go through commit history to >> find implementation details. >> >> Thank you. >> Sincerely, >> Riyafa >> >> On 30 July 2017 at 13:52, Riyafa Abdul Hameed wrote: >> >> > Dear all, >> > >> > I want to simply create an aggregate function that for the moment need >> not >> > run on a cluster. It only needs to run on a single machine. >> > I tried the following >> > >> > - I created 2 descriptors ScalarSTUnionAggregateDescriptor[1] and >> > STUnionAggregateDescriptor[2] >> > - Then added those to the BuiltinFunctions[3] and named the scalar >> > descriptor as st-union with arity 1 and the other descriptor as >> > agg-st-union with arity 1. >> > - And added these functions to the FunctionCollection[4] using the >> > temp field >> > >> > This hasn't worked. >> > >> > Can someone please guide me with the minimal classes that needs to be >> > created and the naming conventions that needs to be used? And where to >> add >> > in these classes in BuiltinFunctions and FunctionCollection? >> > >> > I am asking for help again and again (really begging) because it is the >> > most unclear task I have been trying to do. If I can finally get this >> done >> > I certainly hope to write a comprehensive documentation so that future >> > *remote* developers won't fall into the same trouble of figuring out "how >> > to properly write an aggregate function?" >> > >> > I only want it to work locally at first. Not about distributed settings. >> > Please help. >> > >> > Thank you. >> > >> > Sincerely, >> > >> > Riyafa >> > >> > [1] https://github.com/riyafa/asterixdb/blob/ >> > 0b1cdd8090fff82026401ce399383965baefd620/asterixdb/asterix- >> > runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ >> > ScalarSTUnionAggregateDescriptor.java >> > >> > [2] https://github.com/riyafa/asterixdb/blob/ >> > 0b1cdd8090fff82026401ce399383965baefd620/asterixdb/asterix- >> > runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/ >> > STUnionAggregateDescriptor.java >> > >> > [3]https://github.com/riyafa/asterixdb/blob/ >> 0b1cdd8090fff82026401ce3993839 >> > 65baefd620/asterixdb/asterix-om/src/main/java/org/apache/ >> > asterix/om/functions/BuiltinFunctions.java >> > >> > [4] https://github.com/riyafa/asterixdb/blob/ >> > d99fd65d897cea12e5df5449390238e4a05fa151/asterixdb/asterix- >> > runtime/src/main/java/org/apache/asterix/runtime/ >> > functions/FunctionCollection.java >> > >> >> >> >> -- >> Riyafa Abdul Hameed >> Undergraduate, University of Moratuwa >> >> Email: riyafa.12@cse.mrt.ac.lk >> Website: https://riyafa.wordpress.com/ >> >> >> > > > > -- > > Ahmed Eldawy > Assistant Professor > http://www.cs.ucr.edu/~eldawy > Tel: +1 (951) 827-5654