Skip to content

Commit

Permalink
Limit sets to one primitive element in ZNG spec (#431)
Browse files Browse the repository at this point in the history
This brings the spec in line with the implementation.
  • Loading branch information
nwt authored Mar 18, 2020
1 parent cb7b4cd commit 53e7540
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions zng/docs/spec.md
Original file line number Diff line number Diff line change
@@ -255,15 +255,18 @@ the array encoded as a `uvarint`:

#### 2.1.1.3 Set Typedef

A set type is encoded as a concatenation of the type IDs that comprise
the elements of the set where each type ID and the number of types
in the set are all encoded as a `uvarint`:
A set type is encoded as a type count followed by the type ID of the
elements of the set, each encoded as a `<uvarint>`:
```
----------------------------------------
|0x82|<ntypes><type-id-1><type-id-2>...|
----------------------------------------
-------------------------
|0x82|<ntypes>|<type-id>|
-------------------------
```

`<ntypes>` must be 1.

`<type-id>` must be a primitive type ID.

#### 2.1.1.4 Union Typedef

A union typedef creates a new type ID equal to the next stream type ID
@@ -521,7 +524,7 @@ grammar describing the textual type encodings is:
| record [ <columns> ]
| record [ ]
| union [ <stype-list> ]
| set [ <stype-list> ]
| set [ <stype> ]
<stype-list> := <stype>

0 comments on commit 53e7540

Please sign in to comment.