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