From 53e75404372e8039028327335880fb0aabd52f17 Mon Sep 17 00:00:00 2001 From: Noah Treuhaft Date: Wed, 18 Mar 2020 10:26:41 -0700 Subject: [PATCH] Limit sets to one primitive element in ZNG spec (#431) This brings the spec in line with the implementation. --- zng/docs/spec.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/zng/docs/spec.md b/zng/docs/spec.md index aa1a6f1325..b5793cc53c 100644 --- a/zng/docs/spec.md +++ b/zng/docs/spec.md @@ -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 ``: ``` ----------------------------------------- -|0x82|...| ----------------------------------------- +------------------------- +|0x82||| +------------------------- ``` +`` must be 1. + +`` 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 [ ] | record [ ] | union [ ] - | set [ ] + | set [ ] :=