You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "godfrey he (JIRA)" <ji...@apache.org> on 2018/05/10 02:01:00 UTC

[jira] [Updated] (CALCITE-2306) throws AssertionError in RexLiteral.getValue3 when null value is DECIMAL type

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

godfrey he updated CALCITE-2306:
--------------------------------
    Summary: throws AssertionError in RexLiteral.getValue3 when null value is DECIMAL type  (was: get AssertionError in RexLiteral.getValue3 when null value is DECIMAL type)

> throws AssertionError in RexLiteral.getValue3 when null value is DECIMAL type
> -----------------------------------------------------------------------------
>
>                 Key: CALCITE-2306
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2306
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.0
>            Reporter: godfrey he
>            Assignee: Julian Hyde
>            Priority: Major
>
> {code:java}
> @Test public void testDecimalLiteral() {
>   final RelDataTypeFactory typeFactory =
>           new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
>   RelDataType dateType = typeFactory.createSqlType(SqlTypeName.DECIMAL);
>   final RexBuilder builder = new RexBuilder(typeFactory);
>   RexLiteral literal = builder.makeExactLiteral(null, dateType);
>   assertEquals(null, literal.getValue3());
> }
> {code}
> AssertionError is thrown in above case:
> java.lang.AssertionError
>  at org.apache.calcite.rex.RexLiteral.getValue3(RexLiteral.java:757)
>  at org.apache.calcite.rex.RexBuilderTest.testDecimalLiteral(RexBuilderTest.java:485)



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