[jira] [Updated] (KYLIN-3957) Query system_cube get exception Cannot cast "java.math.BigDecimal" to "java.lang.Double"
[ https://issues.apache.org/jira/browse/KYLIN-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chao Long updated KYLIN-3957: - Affects Version/s: v2.6.1 > 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 >Affects Versions: v2.6.1 >Reporter: Chao Long >Assignee: Chao Long >Priority: Major > Fix For: v3.0.0, v2.6.2 > > > 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)
[jira] [Updated] (KYLIN-3957) Query system_cube get exception Cannot cast "java.math.BigDecimal" to "java.lang.Double"
[ https://issues.apache.org/jira/browse/KYLIN-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shaofeng SHI updated KYLIN-3957: Fix Version/s: (was: Future) v2.6.2 v3.0.0 > 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: v3.0.0, v2.6.2 > > > 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)
[jira] [Updated] (KYLIN-3957) Query system_cube get exception Cannot cast "java.math.BigDecimal" to "java.lang.Double"
[ https://issues.apache.org/jira/browse/KYLIN-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chao Long updated KYLIN-3957: - Description: 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} > 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)