Subject: Question about AsterixDB Functions

From: Chen Luo <[email-masked]>
Date: Wed, 27 Sep 2017 20:43:27 -0700

Hi Devs,

Recently I was facing a problem with the IntersectOperator. Previously
we've used the IntersectOperator to intersects primary keys returned from
searching multiple secondary indexes, and use them to perform primary key
lookups. However, with component Id-based acceleration, each primary key
returned from a secondary index would carry a component Id (which is two
numbers). Thus, inside the IntersectOperator, we only intersect the primary
keys, while need to select a proper component Id based on these inputs. For
example, for 3 input tuples (a, [1, 3]), (a, [0, 2]) and (a, [2, 2]), where
'a' is the primary key and the interval is the component Id, we may return
(a, [2, 2]) as the output of the intersection.

Thus, my question is that *is there any function interface inside AsterixDB
which takes a list of input tuples and produce a tuple as a result*? With
this functionality, we can devise strategies to select the best component
Id for each primary key. Any help is appreciated!

Best regards,
Chen Luo

---

From: Chen Luo <[email-masked]>
Date: Wed, 27 Sep 2017 23:15:32 -0700

NVM, I think I can implement a customized aggregate function for this
purpose (though it's semantics is slightly different from traditional SQL
aggregate functions which only produce one result value). Please correct me
if my understanding is wrong...

On Wed, Sep 27, 2017 at 8:43 PM, Chen Luo <[email-masked]> wrote:

> Thus, my question is that *is there any function interface inside
> AsterixDB which takes a list of input tuples and produce a tuple as a
> result*? With this functionality, we can devise strategies to select the
> best component Id for each primary key. Any help is appreciated!
>
> Best regards,
> Chen Luo
>