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:21:00 UTC
[jira] [Resolved] (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 resolved CALCITE-2306.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.17.0
Fixed in [e1326ace|http://git-wip-us.apache.org/repos/asf/calcite/commit/e1326ace].
> 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
> Fix For: 1.17.0
>
>
> {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)