Yes and no.

It would be pretty easy to build a Drill function that calls out to Jython
code.  It should be relatively easy to pass a Python function name in as
one of the arguments as well.

The issues with this approach are:

1) kinda ugly because you aren't calling your code directly

2) Jython isn't quite Python

I have no idea how to do it specifically, but it is plausible that you
could build something that automatically generates the interlude function
for you in Java that calls your Python code. Python annotations might be
the cat's pajamas for this.  Or not.  Hard to say.

The Java API that Drill provides is not a traditional API in the normal
sense of the word because Drill actually snarfs the source code and inlines
it into Drill-generated code.  It wouldn't understand your Python code at
all.

It might be possible to teach Drill how to understand how to transform
Python UDF's directly into something that Drill could use, but that would
definitely be a bit ambitious.

How utterly clean an interface do you need?






On Tue, Jun 23, 2015 at 10:10 PM, Alok Tanna <[email protected]>
wrote:

> Can we create Custom Functions using Python in Drill ?
>
> I do understand Drill provides a high performance Java API with interfaces
> so that we can implement to develop simple and aggregate custom functions.
>
> Thanks,
> Alok Tanna
>

Reply via email to