kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-3957) Query system_cube get exception Cannot cast "java.math.BigDecimal" to "java.lang.Double"
Date Tue, 16 Apr 2019 02:51:00 GMT

    [ https://issues.apache.org/jira/browse/KYLIN-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16818570#comment-16818570
] 

ASF GitHub Bot commented on KYLIN-3957:
---------------------------------------

nichunen commented on pull request #607: KYLIN-3957 Fix exception cannot cast 'java.math.BigDecimal'
to 'java.…
URL: https://github.com/apache/kylin/pull/607
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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
>
> 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