I am trying to implement a reflect UDF for allowing drill to use java
methods directly:
https://issues.apache.org/jira/browse/DRILL-345
I would be used like:
SELECT reflect("java.lang.String", "valueOf", 1),
reflect("java.lang.String", "isEmpty"),
reflect("java.lang.Math", "max", 2, 3),
reflect("java.lang.Math", "min", 2, 3),
reflect("java.lang.Math", "round", 2.5),
reflect("java.lang.Math", "exp", 1.0),
reflect("java.lang.Math", "floor", 1.9)FROM src LIMIT 1;
1 true 3 2 3 2.7182818284590455 1.0
So, while the first 2 params would be strings, there can be any number of
parameters following them.
How to I pass variable length arguments to any Drill Function?
Is something similar to this being done anywhere in the code?
Peace,
Yash