You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/05/11 17:20:00 UTC
[jira] [Updated] (CALCITE-2306) RexLiteral.getValue3 throws
AssertionError with null literal of type DECIMAL
[ https://issues.apache.org/jira/browse/CALCITE-2306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-2306:
---------------------------------
Summary: RexLiteral.getValue3 throws AssertionError with null literal of type DECIMAL (was: throws AssertionError in RexLiteral.getValue3 when null value is DECIMAL type)
> RexLiteral.getValue3 throws AssertionError with null literal of type DECIMAL
> ----------------------------------------------------------------------------
>
> 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)