Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-31778

Casting array of rows produces incorrect result

    XMLWordPrintableJSON

Details

    Description

      select CAST(commissions AS ARRAY<ROW<amount DOUBLE>>) as commissions             from (select ARRAY[ROW(123), ROW(234)] commissions)

      Expected output:

      +----+--------------------------------+
      | op |                    commissions |
      +----+--------------------------------+
      | +I |             [(123.0), (234.0)] |
      +----+--------------------------------+
       

      Actual output:

      +----+--------------------------------+
      | op |                    commissions |
      +----+--------------------------------+
      | +I |             [(234.0), (234.0)] |
      +----+--------------------------------+ 

      Full working example: https://gist.github.com/soin08/5e0038dbefeba9192706e05a78ef3bc1

      Attachments

        1. image-2023-04-12-15-23-46-669.png
          614 kB
          Ilya Soin
        2. screenshot-2.png
          161 kB
          Ilya Soin

        Issue Links

          Activity

            People

              soin08 Ilya Soin
              soin08 Ilya Soin
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: