Function Matching Rules for UDFs - apache/drill GitHub Wiki
Rules of Thumb
Given the type conversion rules, we can get the most bang out of our UDFs if we do the following:
- For simple UDFs, allow Drill to do null handling. (For aggregates, we must do it.) Drill will then pass our function only non-nullable holders.
- Choose the
Float8type (simple) orNullableFloat8type (aggregates) for arguments as it will work with any of Drill's integral of floating point types (Drill do any necessary conversion.) - If the argument is best defined as an integer, choose
BigIntas it will work for all integral types (including theBigInttype used for JSON integers.)