Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify that all data types except maps are supported as keys #6735

Merged
merged 2 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/concepts/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,13 @@ ARRAY[2, 4, 6]
### Map type

The `MAP` type defines a variable-length collection of key-value pairs. All keys in the map must be
of the same type. All values in the map must be of the same type.
of the same type. All values in the map must be of the same type. Currently only `STRING` keys are
supported. The value type can be any valid SQL type.

!!! note
The `MAP` type is only supported for value columns, not key columns, as map keys
may lead to unexpected behavior due to inconsistent serialization.
This restriction includes nested types containing maps as well.

To declare a `MAP` use the syntax:

Expand Down
5 changes: 5 additions & 0 deletions docs/developer-guide/syntax-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ SELECT ARRAY[s1.colA, s1.colB, s1.colC] FROM s1 EMIT CHANGES;
MAP<KeyType, ValueType>
```

!!! note
The `MAP` type is only supported for value columns, not key columns, as map keys
may lead to unexpected behavior due to inconsistent serialization.
This restriction includes nested types containing maps as well.

!!! note
The `DELIMITED` format doesn't support maps.

Expand Down