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 E72A52009F3 for ; Sat, 4 Jun 2016 09:02:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E5E12160A26; Sat, 4 Jun 2016 07:02:18 +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 157FE160A1E for ; Sat, 4 Jun 2016 09:02:17 +0200 (CEST) Received: (qmail 69329 invoked by uid 500); 4 Jun 2016 07:02:17 -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 69312 invoked by uid 99); 4 Jun 2016 07:02:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jun 2016 07:02:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8CB5C1803EA for ; Sat, 4 Jun 2016 07:02:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.821 X-Spam-Level: X-Spam-Status: No, score=-0.821 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id v4HM5SFSHi9i for ; Sat, 4 Jun 2016 07:02:14 +0000 (UTC) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id E15675F2C3 for ; Sat, 4 Jun 2016 07:02:13 +0000 (UTC) Received: by mail-it0-f43.google.com with SMTP id i65so518173ith.1 for ; Sat, 04 Jun 2016 00:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=u5EDMODM/GTuigU/K+8VbMRxKiBf1U5t4gP0MCpaFA0=; b=byAjqwZ4LzEBjlCy6xc+/nn+pkh1Z4lBRShpehfiKjeUh/NvxFSThNGnd7qcitRXRY b5RgENW0czRr6nXHClucPhJfF4GwcM1C/oaiGIFQ0k7RGDOweKDs4p8LnTpnDvmZ3wGg ENzxaz0LKT9uYIJeeDzb4ZTOwVP0wW6gBbG6uDDXMC4mjjAy/fVbEcJhEixlzSbgRrG3 PAfHQaBaRUHkGgZhSK7PFJCjF8sXrf6Z/UkCdqO4uHg8nYJv196m4k9uMOnLaelzKIV8 2d/DkOj44/fUUWhWvZzTSNKoTLKvi1pNmVJFjl83AeGbBXqPGGRNJYwRLBFf9Cpbg1mJ TXnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=u5EDMODM/GTuigU/K+8VbMRxKiBf1U5t4gP0MCpaFA0=; b=XibxOpDD5KNVSW/tsRFLWPNeP9Z04iema1FSNEVU0Sg4QGDNG27XI8+yoB/+2c63Is DFRwIrwomVtwvEmdmzMktCUvdKbURimycDs7ah4pPZGfju8ZC+qtb0gOIdeCWGrwqsrF DBTnFMHHOxQ3ufjKJPB8lGJcYVcj2CspMf0ViykaY+xU30CO111nsJs0AZAvD1v1YMOv V73KiJyN56EIhXanhIvTl5NL0IMTOrWXfA0rVnoCxP3HL0FNN3x9jRW2nCpVX5FXBYwc 5puH1nT5u+DlTcI/TOUhGrXLcL+iYLIZCiAAhoILqsP1RgLfdBHZwA3QE/LcsGLQ+94+ uUxg== X-Gm-Message-State: ALyK8tLsjd03hEODpOet8e4WkkXJ/IPELzosVoSrSmsGdCgz4kz/gx0ijT3P+ZqXIiQ5H6JrVMmkCpdTaQ0OHg== X-Received: by 10.36.81.79 with SMTP id s76mr3946520ita.71.1465023732785; Sat, 04 Jun 2016 00:02:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.20.198 with HTTP; Sat, 4 Jun 2016 00:02:12 -0700 (PDT) In-Reply-To: References: <08E505AC-AFDC-43C3-B5EC-33991E868AFF@gmail.com> From: Chen Li Date: Sat, 4 Jun 2016 00:02:12 -0700 Message-ID: Subject: Re: User Define Function (UDF) in AsterixDB To: dev@asterixdb.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Sat, 04 Jun 2016 07:02:19 -0000 We had several separate discussions about UDF. Is it possible to take this chance to polish the documentation so that other users can rely on the documentation to get started? Chen On Fri, Jun 3, 2016 at 12:08 AM, Xikui Wang wrote: > Hi Heri, > > Thanks for sharing the document. It is useful as the general structure of > UDF remains the same. > > Best, > Xikui > > On Thu, Jun 2, 2016 at 11:34 PM, Heri Ramampiaro wrote: > >> Xikui, >> >> Enclosed is an instruction based on the older version of feeds and UDF >> that perhaps could help you >> figur out the principle behind installing external libs in AsterixDB >> >> Best, >> -heri >> >> >> >> >> > On Jun 2, 2016, at 23:44, Xikui Wang wrote: >> > >> > Hi Abdullah, >> > >> > Thanks for your help. I met an error when I was trying to execute >> 'install >> > externallibtest testlib PATH/TO/testlib-zip-binary-assembly.zip' from the >> > web query interface. Probably I used this in a wrong way? >> > >> > Best, >> > Xikui >> > >> > On Thu, Jun 2, 2016 at 2:26 PM, abdullah alamoudi >> > wrote: >> > >> >> Hi Xikui, >> >> 1. How to install UDF on instance running from Eclipse+ >> >> AsterixHyracksIntegrationUtil? >> >> >> >> There are a few external library test cases, you can look at them and >> see >> >> how we test those. One thing you will notice is that we only test a few >> >> examples. Clearly, we can do better. You can find the test cases in: >> >> >> >> >> >> >> asterixdb/asterixdb/asterix-app/src/test/resources/runtimets/queries/external-library >> >> >> >> As for the difference between scalar, aggregate, and unnest functions, >> here >> >> is the way I see it: >> >> 1. Scalar: one input to one output. >> >> 2. Aggregate: 0 or more inputs to one output. >> >> 3. Unnest: one input to 0 or more outputs. >> >> >> >> Hope that helps, >> >> Abdullah. >> >> >> >> On Thu, Jun 2, 2016 at 11:40 PM, Xikui Wang wrote: >> >> >> >>> Hi Devs, >> >>> >> >>> I want to use UDF to process the Tweets that I got from the feed, and I >> >> met >> >>> following two questions. Hope you guys can help me or point me to the >> >> right >> >>> documentation. >> >>> >> >>> 1. How to install UDF on instance running from >> >>> Eclipse+AsterixHyracksIntegrationUtil? >> >>> >> >>> Website only mentioned how to install with Managix. I am wondering if >> >> there >> >>> is a way for me to install it on instance running in Eclipse, which is >> >>> easier for debugging. >> >>> >> >>> 2. Implementation of UDF >> >>> >> >>> I found several UDFs in >> >>> >> >>> >> >> >> asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library, >> >>> like SumFunction, ParseTweetFunction. I assume if I want to implement >> new >> >>> UDF, it needs to implement IExternalScalarFunction interface and to be >> >> put >> >>> under the same directory? I also found 'aggregate' and 'unnest' type >> >> which >> >>> is not implemented yet. Just out of curiosity, what is the difference >> >>> between them? >> >>> >> >>> Thanks in advance! :) >> >>> >> >>> Best, >> >>> Xikui >> >>> >> >> >> >> >>