ASF GitHub Bot logged work on BEAM-2990:

                Author: ASF GitHub Bot
            Created on: 11/Apr/18 10:25
            Start Date: 11/Apr/18 10:25
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on a change in pull request #5079: 
[BEAM-2990] support MAP in SQL schema
URL: https://github.com/apache/beam/pull/5079#discussion_r180705570

 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java
 @@ -242,6 +247,10 @@ public FieldType type() {
     public abstract TypeName getTypeName();
     // For container types (e.g. ARRAY), returns the type of the contained 
     @Nullable public abstract FieldType getComponentType();
+    // For MAP type, returns the type of the key element.
+    @Nullable public abstract FieldType getComponentKeyType();
+    // For MAP type, returns the type of the value element.
+    @Nullable public abstract FieldType getComponentValueType();
 Review comment:
commit:7bf9d2048e8d568ee9280629db391775cc490358; resolved:0-->
   > **XuMingmin** wrote:
   > I would prefer to have different fields for MAP and ARRAY, if it doesn't 
cause significant performance issue.
   two questions/comments
   1. I think the key type be a TypeName instead of a FieldType? Making it a 
FieldType makes it legal for the key to be a complex value - e.g. they key 
could be an array type - which doesn't sound very meaningful to me.
   2. Have you considered introducing a new key-value type here (pair of 
TypeName, FieldType)?

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 89883)
    Time Spent: 2.5h  (was: 2h 20m)

> support data type MAP
> ---------------------
>                 Key: BEAM-2990
>                 URL: https://issues.apache.org/jira/browse/BEAM-2990
>             Project: Beam
>          Issue Type: New Feature
>          Components: dsl-sql
>            Reporter: Xu Mingmin
>            Assignee: Xu Mingmin
>            Priority: Major
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
> support Non-scalar types:
> MAP   Collection of keys mapped to values
> ARRAY         Ordered, contiguous collection that may contain duplicates

This message was sent by Atlassian JIRA

Reply via email to