git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


godfrey he created CALCITE-2306:
-----------------------------------

             Summary: get 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


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