drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AnilKumar B <akumarb2...@gmail.com>
Subject Facing issues while implementing Math functions
Date Sat, 01 Mar 2014 14:16:25 GMT
I am new to Apache drill,  trying to implement Power
function(DRILL-390<https://issues.apache.org/jira/browse/DRILL-390>),
I implemented Power function, and registered in
org.apache.drill.common.expression.fn.MathFunctions as below.

FunctionDefinition.operator("power", new
ArgumentValidators.NumericTypeAllowed(2, true), new
OutputTypeDeterminer.SameAsAnySoft() , "pow")

While testing, I am facing below issue, am I missing any other registration?

0: jdbc:drill:schema=parquet-local> SELECT pow(2.0,3.0) AS POW_VALUE FROM
"sample-data/region.parquet";
Mar 01, 2014 7:35:50 PM org.eigenbase.sql.validate.SqlValidatorException
<init>
SEVERE: org.eigenbase.sql.validate.SqlValidatorException: No match found
for function signature POW(<NUMERIC>, <NUMERIC>)
Mar 01, 2014 7:35:50 PM org.eigenbase.util.EigenbaseException <init>
SEVERE: org.eigenbase.util.EigenbaseContextException: From line 1, column 8
to line 1, column 19
org.eigenbase.util.EigenbaseContextException: From line 1, column 8 to line
1, column 19
    at
org.eigenbase.resource.EigenbaseResource$_Def12.ex(EigenbaseResource.java:1026)
    at org.eigenbase.sql.SqlUtil.newContextException(SqlUtil.java:739)
    at org.eigenbase.sql.SqlUtil.newContextException(SqlUtil.java:726)
    at
org.eigenbase.sql.validate.SqlValidatorImpl.newValidationError(SqlValidatorImpl.java:3849)
    at
org.eigenbase.sql.validate.SqlValidatorImpl.handleUnresolvedFunction(SqlValidatorImpl.java:1613)
    at org.eigenbase.sql.SqlFunction.deriveType(SqlFunction.java:312)
    at org.eigenbase.sql.SqlFunction.deriveType(SqlFunction.java:222)




Thanks & Regards,
B Anil Kumar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message