You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paul Rogers edited this page Jan 8, 2018
·
1 revision
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 Float8 type (simple) or NullableFloat8 type (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 BigInt as it will work for all integral types (including the BigInt type used for JSON integers.)