+1, this is a great formalization of an intuitive idea.

On Tue, May 13, 2025 at 12:07 PM Peeyush Gupta
<peeyush.gu...@couchbase.com.invalid> wrote:
>
> Hi,
>
> As a part of this we should also make sure that we make the connection
> of these to feeds - so that you can hang a transform function on a feed,
> which is the scenario where these are much safer than general functions
> hanging on feeds.  (We might want to add a
> backward-compatibility-breaking restriction that doesn't allow the
> functions on feeds to NOT be this type.)
>
> Sounds like a good idea.
>
> We should presumably allow these functions to be called in queries like
> other functions.  (In case that's not in plan at the moment, it
> definitely should be - if for no other reason than for testing.)
>
> Transform functions can be used just like any other UDFs.
>
> We should presumably allow transform functions to call UDFs in their
> definitions, as long as the resulting query still stays "in bounds"
> (using only the bits inside the argument object).  Either way, the spec
> should say whether or not this is going to be supported.
>
> Yes, other UDFs can be used in the definition if the original conditions are 
> met.
> I have updated the spec to reflect this.
>
> Thanks,
> Peeyush
>
> From: Mike Carey <dtab...@gmail.com>
> Date: Tuesday, May 13, 2025 at 10:46 AM
> To: dev@asterixdb.apache.org <dev@asterixdb.apache.org>
> Subject: Re: [DISCUSS][APE] Proposal for Adding transform function
> Looks good - and very useful! +1 for this addition to AsterixDB.
>
> As a part of this we should also make sure that we make the connection
> of these to feeds - so that you can hang a transform function on a feed,
> which is the scenario where these are much safer than general functions
> hanging on feeds.  (We might want to add a
> backward-compatibility-breaking restriction that doesn't allow the
> functions on feeds to NOT be this type.)
>
> We should presumably allow these functions to be called in queries like
> other functions.  (In case that's not in plan at the moment, it
> definitely should be - if for no other reason than for testing.)
>
> We should presumably allow transform functions to call UDFs in their
> definitions, as long as the resulting query still stays "in bounds"
> (using only the bits inside the argument object).  Either way, the spec
> should say whether or not this is going to be supported.
>
> Cheers,
>
> Mike
>
>
> On 5/12/25 6:32 PM, Peeyush Gupta wrote:
> > Hi All,
> >
> > Initiating a discussion to propose adding transform function.
> >
> > Feature: Adding transform function.
> > Details: SQL++ UDFs are very powerful, in that they can return anything. In 
> > certain circumstances this is not desirable. For example, with feeds we can 
> > today apply a function on every record incoming to the dataset. A function 
> > that produces an entire dataset's worth of data for 1 input value would not 
> > be feasible to run in that fashion. Hence, restricting the function so that 
> > it may only take an input, and do some transform on it, is desirable for 
> > performance reasons.
> > APE:https://cwiki.apache.org/confluence/display/ASTERIXDB/APE+21%3A+Transform+Function
> >
> > Thanks,
> > Peeyush
> >
> >

Reply via email to