Yash Sharma 2013-09-08, 11:42
-Re: Exception while implementing drill trigonometric functions (For DRILL-219). Need tips.
Julian Hyde 2013-09-09, 19:30
That error stack says that the SIN function is not known to Optiq's SQL validator. Optiq's validator is driven by a table of functions and operators, but Drill doesn't currently have a way to add to that table.
Since SIN is a generally useful function, it should be built-in in Optiq. You could do that by modifying SqlStdOperatorTable and adding a field similar to the one that defines the SQRT operator:
public static final SqlFunction sqrtFunc new SqlFunction(
I believe the validation rules are identical for SQRT and SIN.
However we should also add a mechanism to Drill to allow it to add its own functions (including user-defined functions) to Optiq's SQL validator on the fly.
Yash Sharma 2013-09-10, 06:02
Julian Hyde 2013-09-10, 06:18
Ted Dunning 2013-09-09, 20:09
Julian Hyde 2013-09-10, 06:38