gszadovszky commented on code in PR #469:
URL: https://github.com/apache/parquet-format/pull/469#discussion_r1827609492


##########
LogicalTypes.md:
##########
@@ -709,13 +709,18 @@ to values. `MAP` must annotate a 3-level structure:
 
 * The outer-most level must be a group annotated with `MAP` that contains a
   single field named `key_value`. The repetition of this level must be either
-  `optional` or `required` and determines whether the list is nullable.
+  `optional` or `required` and determines whether the map is nullable.
 * The middle level, named `key_value`, must be a repeated group with a `key`
-  field for map keys and, optionally, a `value` field for map values.
+  field for map keys and, optionally, a `value` field for map values. It must
+  not contain any other values.
 * The `key` field encodes the map's key type. This field must have
-  repetition `required` and must always be present.
+  repetition `required` and must always be present. It must be placed at the
+  0th position of the `key_value` group. It is suggested to use a primitive as
+  the type.

Review Comment:
   Thanks, @JFinis. TBH, I've added this suggestion so we can start a 
discussion about it.
   
   Your point totally makes sense and I tend to agree with it. I feel a similar 
pattern about the "last key-value matters" statement. Just like we would fill 
up a hashmap as the values come. But in many implementations we do not really 
care about this, and since we have a list of key-value entries, equal keys just 
stay in the list.
   
   Anyway, I'll keep my suggestion for a while in this PR so others may comment 
on it. I'll remove it later, if there are no objections.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to