Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Drill >> mail # dev >> Re: Exception while implementing drill trigonometric functions (For DRILL-219). Need tips.


+
Julian Hyde 2013-09-09, 19:30
+
Yash Sharma 2013-09-10, 06:02
+
Julian Hyde 2013-09-10, 06:18
Copy link to this message
-
Re: Exception while implementing drill trigonometric functions (For DRILL-219). Need tips.
Julian,

I encountered the same problem adding things like AVG.  Are aggregators
handled the same way (and in the same place)?
On Mon, Sep 9, 2013 at 12:30 PM, Julian Hyde <[EMAIL PROTECTED]> wrote:

> 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(
>             "SQRT",
>             SqlKind.OTHER_FUNCTION,
>             SqlTypeStrategies.rtiNullableDouble,
>             null,
>             SqlTypeStrategies.otcNumeric,
>             SqlFunctionCategory.Numeric);
>
> 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.
>
> Julian
>
>
+
Julian Hyde 2013-09-10, 06:38
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB