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

Add ARRAY function (enabled in Spark library)

    XMLWordPrintableJSON

Details

    Description

      The following query is valid in Apache Spark.

      spark-shell
      
      scala> spark.sql("""select array(1, 2, 3)""")
      res1: org.apache.spark.sql.DataFrame = [array(1, 2, 3): array<int>]

      However, it would fail to parse in Apache Calcite

       

      AtomicRowExpression should not have ArrayConstructor for Apache Spark. Arrays are constructed by calling the array function (https://spark.apache.org/docs/latest/api/sql/index.html#array).

       

      array()
      array(1)
      array(1, 2, 3)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              MasseGuillaume Guillaume Massé
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 20m
                  3h 20m