drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinfeng Ni (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-1391) Some math functions on decimal type may cause compilation error in run-time generated code.
Date Mon, 08 Sep 2014 22:35:31 GMT
Jinfeng Ni created DRILL-1391:
---------------------------------

             Summary: Some math functions on decimal type may cause compilation error in run-time
generated code. 
                 Key: DRILL-1391
                 URL: https://issues.apache.org/jira/browse/DRILL-1391
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Jinfeng Ni
            Assignee: Jinfeng Ni


If a query has an expression like the following :

log((cast(DEC18 as decimal18(18, 9))))

Drill will hit an compilation error in the run-time generated code.

org.apache.drill.exec.rpc.RpcException: Screen received stop request sent. Line 189, Column
35: Cannot determine simple type name "BigDecimal" [32dbdc99-a688-45c6-aa8f-50506be4730d].

The complained code is :

188:    ExtendedMathFunctions$LogDecimal18_eval: {
189:        double dblval = new BigDecimal(in.value).setScale(in.scale).doubleValue();
190:
191:        out.value = java.lang.Math.log(dblval);
192:    }

The reason of this compilation error is that the function template for those math functions
miss fully qualifying the type of "BigDecimal", causing this compilation error.

 




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message