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

ARRAY_AGG should returns ARRAY NULL when there's no input rows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.35.0
    • 1.38.0
    • None

    Description

      ARRAY_AGG in BigQuery and Postgres returns NULL if there are zero input rows or expression evaluates to NULL for all rows.
      However, it will return `ARRAY<arg0> NOT NULL` in the return type of the function definition.

      https://cloud.google.com/bigquery/docs/reference/standard-sql/aggregate_functions#array_agg
      https://www.postgresql.org/docs/8.4/functions-aggregate.html

      Attachments

        Issue Links

          Activity

            People

              jiabao.sun jiabao.sun
              jiabao.sun jiabao.sun
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: