kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chao Long (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KYLIN-3957) Query system_cube get exception Cannot cast "java.math.BigDecimal" to "java.lang.Double"
Date Thu, 18 Apr 2019 02:17:00 GMT

     [ https://issues.apache.org/jira/browse/KYLIN-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chao Long resolved KYLIN-3957.
------------------------------
       Resolution: Fixed
    Fix Version/s: Future

> Query system_cube get exception Cannot cast "java.math.BigDecimal" to "java.lang.Double"
> ----------------------------------------------------------------------------------------
>
>                 Key: KYLIN-3957
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3957
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>            Reporter: Chao Long
>            Assignee: Chao Long
>            Priority: Major
>             Fix For: Future
>
>
> In system cube, the return dataType of column whose real dataType is Double will be converted
to Decimal in SUM measure.
> {code:java}
>         FunctionDesc function = new FunctionDesc();
>         function.setExpression(FunctionDesc.FUNC_SUM);
>         function.setParameter(parameterDesc);
>         function.setReturnType(dataType.equals(HiveTableCreator.HiveTypeEnum.HDOUBLE.toString())
>                 ? HiveTableCreator.HiveTypeEnum.HDECIMAL.toString()
>                 : dataType);
> {code}
> but query with that measure will get exception:
> {code}
> Caused by: org.codehaus.commons.compiler.CompileException: Line 108, Column 44: Cannot
cast "java.math.BigDecimal" to "java.lang.Double"
> 	at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:10092)
> 	at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:3839)
> 	at org.codehaus.janino.UnitCompiler.access$6400(UnitCompiler.java:183)
> 	at org.codehaus.janino.UnitCompiler$10.visitCast(UnitCompiler.java:3246)
> 	at org.codehaus.janino.Java$Cast.accept(Java.java:3802)
> 	at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3278)
> 	at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:3845)
> 	at org.codehaus.janino.UnitCompiler.access$8600(UnitCompiler.java:183)
> 	at org.codehaus.janino.UnitCompiler$10.visitParenthesizedExpression(UnitCompiler.java:3274)
> 	at org.codehaus.janino.Java$ParenthesizedExpression.accept(Java.java:3830)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message