You can create several functions with the same name but with different parameters types and / or quantity.
Example: *bool_or* [1] function can have different input parameter: BitHolder or NullableBitHolder *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 ee76fc87e882afe170681/exec/java-exec/src/main/java/org/ apache/drill/exec/expr/fn/impl/BooleanAggrFunctions.java [2] https://github.com/apache/drill/blob/1e6fa00cd4b0b1db416 14749f6d12c03f0ca7990/exec/java-exec/src/main/codegen/ templates/DirectoryExplorers.java On Tue, Jan 17, 2017 at 6:39 PM, Muhammad Gelbana <[email protected]> wrote: > 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 >
