This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new ace8613  Fix specification to match implementation
ace8613 is described below

commit ace8613f0f21601296744eedc1ce80dd1ca0fdae
Author: Triton <[email protected]>
AuthorDate: Tue Jul 20 08:01:19 2021 +0200

    Fix specification to match implementation
    
    As stated in THRIFT-5300, the specification was wrong and type identifiers 
for collections DO match the field types (except for the obvious boolean type 
which is then represented as only `BOOL_TRUE`).
    
    Also replaced `BYTE` name with `I8` as the former is documented as a 
compatibility name only (especially since some languages have an unsigned byte 
type).
    
    [skip ci] Trivial documentation changes only.
---
 doc/specs/thrift-binary-protocol.md  |  6 +++---
 doc/specs/thrift-compact-protocol.md | 24 +++++++++++++-----------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/doc/specs/thrift-binary-protocol.md 
b/doc/specs/thrift-binary-protocol.md
index fc3338f..4284328 100644
--- a/doc/specs/thrift-binary-protocol.md
+++ b/doc/specs/thrift-binary-protocol.md
@@ -1,4 +1,4 @@
-Thrift Binary protocol encoding 
+Thrift Binary protocol encoding
 ===============================
 
 <!--
@@ -182,12 +182,12 @@ Where:
 The following field-types are used:
 
 * `BOOL`, encoded as `2`
-* `BYTE`, encoded as `3`
+* `I8`, encoded as `3`
 * `DOUBLE`, encoded as `4`
 * `I16`, encoded as `6`
 * `I32`, encoded as `8`
 * `I64`, encoded as `10`
-* `STRING`, used for binary and string fields, encoded as `11`
+* `BINARY`, used for binary and string fields, encoded as `11`
 * `STRUCT`, used for structs and union fields, encoded as `12`
 * `MAP`, encoded as `13`
 * `SET`, encoded as `14`
diff --git a/doc/specs/thrift-compact-protocol.md 
b/doc/specs/thrift-compact-protocol.md
index 89301eb..07cc562 100644
--- a/doc/specs/thrift-compact-protocol.md
+++ b/doc/specs/thrift-compact-protocol.md
@@ -205,7 +205,7 @@ The following field-types can be encoded:
 
 * `BOOLEAN_TRUE`, encoded as `1`
 * `BOOLEAN_FALSE`, encoded as `2`
-* `BYTE`, encoded as `3`
+* `I8`, encoded as `3`
 * `I16`, encoded as `4`
 * `I32`, encoded as `5`
 * `I64`, encoded as `6`
@@ -245,20 +245,22 @@ Where:
 
 The short form should be used when the length is in the range 0 - 14 
(inclusive).
 
-The following element-types are used (note that these are _different_ from the 
field-types):
+The following element-types are used (see note below):
 
 * `BOOL`, encoded as `2`
-* `BYTE`, encoded as `3`
-* `DOUBLE`, encoded as `4`
-* `I16`, encoded as `6`
-* `I32`, encoded as `8`
-* `I64`, encoded as `10`
-* `STRING`, used for binary and string fields, encoded as `11`
+* `I8`, encoded as `3`
+* `I16`, encoded as `4`
+* `I32`, encoded as `5`
+* `I64`, encoded as `6`
+* `DOUBLE`, encoded as `7`
+* `BINARY`, used for binary and string fields, encoded as `8`
+* `LIST`, encoded as `9`
+* `SET`, encoded as `10`
+* `MAP`, encoded as `11`
 * `STRUCT`, used for structs and union fields, encoded as `12`
-* `MAP`, encoded as `13`
-* `SET`, encoded as `14`
-* `LIST`, encoded as `15`
 
+*Note*: Although field-types and element-types lists are currently very 
similar, there is _no guarantee_ that this will
+remain true after new types are added.
 
 The maximum list/set size is configurable. By default there is no limit 
(meaning the limit is the maximum int32 value:
 2147483647).

Reply via email to