You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@asterixdb.apache.org by Xikui Wang <xi...@uci.edu> on 2020/05/29 02:44:55 UTC
Adding functions from extensions
Hi Devs,
I'm trying to add some functions from the BAD extension to AsterixDB. I
found there are two ways of adding runtime entities into the
FunctionCollection: 1) Adding an IFunctionRegistrant, 2) Implementing an
extension function manger. However, I didn't find a way to add functions to
Metadata. I wonder there is an existing method for doing so? I did
something similar to the IFunctionRegistrant in the
MetadataBuiltinFunctions on my branch. If we don't have an existing method,
I can try to create a patch on this.
Best,
Xikui
Re: Adding functions from extensions
Posted by Xikui Wang <xi...@uci.edu>.
Ah! I see. Adding functions from the customized *IntegrationUtil.java does
the trick. Thanks a lot!
Best,
Xikui
On Fri, May 29, 2020 at 2:11 PM Dmitry Lychagin
<dm...@couchbase.com.invalid> wrote:
> Xikui,
>
> Do you mean adding functions to BuiltinFunctions?
> BuiltinFunctions.addFunction() is public, so could be called from any of
> your custom initialization code to register new functions there.
>
> Thanks,
> -- Dmitry
>
>
> On 5/28/20, 7:45 PM, "Xikui Wang" <xi...@uci.edu> wrote:
>
> Hi Devs,
>
> I'm trying to add some functions from the BAD extension to AsterixDB. I
> found there are two ways of adding runtime entities into the
> FunctionCollection: 1) Adding an IFunctionRegistrant, 2) Implementing
> an
> extension function manger. However, I didn't find a way to add
> functions to
> Metadata. I wonder there is an existing method for doing so? I did
> something similar to the IFunctionRegistrant in the
> MetadataBuiltinFunctions on my branch. If we don't have an existing
> method,
> I can try to create a patch on this.
>
> Best,
> Xikui
>
>
Re: Adding functions from extensions
Posted by Dmitry Lychagin <dm...@couchbase.com.INVALID>.
Xikui,
Do you mean adding functions to BuiltinFunctions?
BuiltinFunctions.addFunction() is public, so could be called from any of your custom initialization code to register new functions there.
Thanks,
-- Dmitry
On 5/28/20, 7:45 PM, "Xikui Wang" <xi...@uci.edu> wrote:
Hi Devs,
I'm trying to add some functions from the BAD extension to AsterixDB. I
found there are two ways of adding runtime entities into the
FunctionCollection: 1) Adding an IFunctionRegistrant, 2) Implementing an
extension function manger. However, I didn't find a way to add functions to
Metadata. I wonder there is an existing method for doing so? I did
something similar to the IFunctionRegistrant in the
MetadataBuiltinFunctions on my branch. If we don't have an existing method,
I can try to create a patch on this.
Best,
Xikui