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/11 01:32:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16471366#comment-16471366 ]
godfrey he commented on CALCITE-2306:
-------------------------------------
PR for the fix: https://github.com/apache/calcite/pull/690
[~julianhyde], could you take a look? Thanks
> 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)