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

Runtime conversion of DECIMAL ARRAY to INT ARRAY fails with a ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.40.0
    • None

    Description

      The test case in dummy.iq:

      select cast(ARRAY[CAST(1.1111 as DECIMAL(2,1)),CAST(2.5465 as DECIMAL(2,1)),CAST(3.06754 as DECIMAL(2,1))] as integer ARRAY); 

      Throws exception:

      java.lang.ClassCastException: class java.math.BigDecimal cannot be cast to class java.lang.Integer (java.math.BigDecimal and java.lang.Integer are in module java.base of loader 'bootstrap')

      Attachments

        Issue Links

          Activity

            People

              nobigo xiong duan
              nobigo xiong duan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: