[ 
https://issues.apache.org/jira/browse/CALCITE-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhen Chen updated CALCITE-6938:
-------------------------------
    Description: 
This implementation ensures zero values of various nested data types can be 
used in {{COALESCE(nestedCol, nestedZero)}} expressions.

Basic Nested Types:
 # ARRAY: Zero value represented as an zero array. e.g. ARRAY<INTEGER> → ARRAY[]
 # MULTISET: Zero value represented as an zero multiset. e.g. MULTISET<INTEGER> 
→ MULTISET[]
 # MAP: Zero value represented as an zero map. e.g. MAP<INTEGER, INTEGER> → 
MAP(0, 0)
 # 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>>>
 * ......

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

Basic Nested Types:
 # ARRAY: Zero value represented as an zero array. e.g. ARRAY<INTEGER> → 
ARRAY[0]
 # MULTISET: Zero value represented as an zero multiset. e.g. MULTISET<INTEGER> 
→ MULTISET[0]
 # MAP: Zero value represented as an zero map. e.g. MAP<INTEGER, INTEGER> → 
MAP(0, 0)
 # 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>>>
 * ......


> Support zero value creation of nested data types
> ------------------------------------------------
>
>                 Key: CALCITE-6938
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6938
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Zhen Chen
>            Assignee: Zhen Chen
>            Priority: Major
>              Labels: pull-request-available
>
> This implementation ensures zero values of various nested data types can be 
> used in {{COALESCE(nestedCol, nestedZero)}} expressions.
> Basic Nested Types:
>  # ARRAY: Zero value represented as an zero array. e.g. ARRAY<INTEGER> → 
> ARRAY[]
>  # MULTISET: Zero value represented as an zero multiset. e.g. 
> MULTISET<INTEGER> → MULTISET[]
>  # MAP: Zero value represented as an zero map. e.g. MAP<INTEGER, INTEGER> → 
> MAP(0, 0)
>  # 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>>>
>  * ......



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to