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

Type inference for ARRAY_INSERT function is incorrect

    XMLWordPrintableJSON

Details

    Description

      The type inference is implemented in SqlLibraryOperators.arrayInsertReturnType.
      Since the spec of the function says that "if the index is larger than the array, the array is padded with NULL values", it implies that the type of the result is always an array with nullable elements, irrespective of the type of the elements of the input array.
      Currently the type inference preserves the element type in the result.

      Attachments

        Issue Links

          Activity

            People

              mbudiu Mihai Budiu
              mbudiu Mihai Budiu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: