drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arina Yelchiyeva <arina.yelchiy...@gmail.com>
Subject Re: How to create a UDF with variable length parameters ?
Date Tue, 17 Jan 2017 17:31:37 GMT
You can create several functions with the same name but with different
parameters types and / or quantity.

*bool_or* [1] function can have different input parameter: BitHolder or
*maxdir* [2] can have one or two input parameters (but code is in template
you have to build Drill project to see generated DirectoryExplorers.class).

[1] https://github.com/apache/drill/blob/5a4ad2a88331dfe7561
[2] https://github.com/apache/drill/blob/1e6fa00cd4b0b1db416

On Tue, Jan 17, 2017 at 6:39 PM, Muhammad Gelbana <m.gelbana@gmail.com>

> Is there a way to create a UDF that supports typically 1 or more parameters
> ? Parameters may be columns, literals or NULLs and the return may be NULL
> or a value.
> It would be still possible to overload such a UDF by declaring one with a
> different type of variables, correct ?
> *---------------------*
> *Muhammad Gelbana*
> http://www.linkedin.com/in/mgelbana

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message