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

Support zero value creation of nested data types

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.40.0
    • None

    Description

      This implementation ensures zero values of various nested data types can be used in COALESCE(nestedCol, nestedZero) expressions.

      Basic Nested Types:

      1. ARRAY: Zero value represented as an zero array. e.g. ARRAY<INTEGER> → ARRAY[]
      2. MULTISET: Zero value represented as an zero multiset. e.g. MULTISET<INTEGER> → MULTISET[]
      3. MAP: Zero value represented as an zero map. e.g. MAP<INTEGER, INTEGER> → MAP(0, 0)
      4. ROW: Zero value with all fields initialized to their respective type's zero value. e.g. ROW<INTEGER, INTEGER> → ROW(0, 0)

      Complex Nested Types:

      • ARRAY<ARRAY<INTEGER>>
      • ARRAY<MAP<VARCHAR(50), INTEGER>>
      • MAP<STRING, ARRAY<ROW<INT, BOOLEAN>>>
      • ......

      Attachments

        Issue Links

          Activity

            People

              jensen Zhen Chen
              jensen Zhen Chen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: