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

Incorrect semantics of ARRAY function (Spark library) when elements have Numeric and Character types

    XMLWordPrintableJSON

Details

    Description

      when run select array(1, 2, 'Hi')

      spark-sql (default)> select array(1, 2, 'Hi');
      ["1","2","Hi"] 

      and calcite will cause java.lang.NullPointerException: inferred array element type.

      Spark supports both character and numeric types in the array, and the return type is character.
      In fact, calcite also allows both character and numeric types to exist in the operand type checker, but there is no corresponding processing logic in the return type inference, so an error is reported.

      We should fix this bug.

      Attachments

        Issue Links

          Activity

            People

              taoran Ran Tao
              taoran Ran Tao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: