Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2306

RexLiteral.getValue3 throws AssertionError with null literal of type DECIMAL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.17.0
    • Component/s: core
    • Labels:
      None

      Description

      @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());
      }
      

      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)

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              godfreyhe godfrey he
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: