View Issue Details

IDProjectCategoryView StatusLast Update
000714810000-006: MappingsSpecpublic2021-11-16 17:30
ReporterThomas Merk Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionreopened 
Fixed in Version1.05.01 RC1 
Summary0007148: Encoding of multidimensional arrays is not clear
Description

Encoding of multidimensional arrays is described in "5.2.5 Arrays" with a reference to 5.2.2.16, how to reconstruct the multiple dimensions from the flat array.
In 5.2.2.16 (Variant) the encoding is described in a different way.

E.g. a matrix of double [2,3]:
5.2.5
Int32 2 (number of dimensions)
Int32 2 (size of first dimension)
Int32 3 (size of second dimension)
Double
...

5.2.2.16:
Int32 6 (size of matrix in flat array, 2*3)
Double
...
Int32 2 (number of dimensions)
Int32 2 (size of first dimension)
Int32 3 (size of second dimension)

In general I would say that description of 5.2.5 is relevant. In Variant "only" the algorithm to serialize a matrix is described.
But it is still confusing...

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

related to 0007119 closedRandy Armstrong When a server contains DataType definitions using both a DataTypeDictionary (v1.03) and a DataTypeDefinition attribute (v1.04), 

Activities

Randy Armstrong

2021-08-18 09:10

administrator   ~0014760

Text clarified while fixing another issue in 1.05.1 DRAFT 3.

Jim Luth

2021-08-31 17:04

administrator   ~0014802

Agreed to changes in 1.05.01 Draft 4.

Thomas Merk

2021-10-25 12:55

reporter   ~0015210

I just re-read the PC 1.05 - and for me no clarification at all ist added.

  • What is "inline" encoding - and where shall it be used
  • What encoding (except inline) is possible - and where shall it be used.

As far as I read in part 6 (5.2.2.16) the variant encodes a matrix value either

  1. as an array (bit 7 in encoding mask)
    • number of elements (flat)
    • element[0][0]
    • ...
  2. as Matrix (bit 6 AND bit 7 ist set)
    • flat number of (elements)
    • element[0][0]
    • ...
    • number of array dimensions
    • arraydimensions[0]
    • ...
      The third option (only bit 6 is set) is not practicable, since the (flat) length of a multi-dimensions array is needed before decoding the elements.
      is this the "inline" encoding mentioned in Mantis 7119?
      I did notwhere find the wording "inline"...

In 5.2.5 (Arrays) however the encoding (multi-dimenasional arrays) is still described

  • number of array dimensions
  • arraydimensions[0]
  • ...
  • element[0][0]
  • ...

I would interprete the specification is this way:
The encoding mentioned in 5.2.2.16 (Variants) is allowed ONLY within variants.
The other encoding shall be used anywhere else.

But:
A specification should not need any interpretation...

If a structured data type description has a field defined, which uses a multi-dimensional array of values, then encoding described in 5.2.5 (Arrays) shall be used.
For me it is still not clearly stated - or I did not find the place where this was clarified.

The background of my question is that we observed some servers, which use the encoding defined in section 5.2.2.16 (Variants) for such matrix fields.
... obviously without the encoding mask.
==> It is not only unclear to me...

Randy Armstrong

2021-11-16 17:29

administrator   ~0015316

Updated the 5.2.5 text in a WG meeting which should make it clearer how the two encodings are used.

Jim Luth

2021-11-16 17:30

administrator   ~0015317

Agreed to updated text.

Issue History

Date Modified Username Field Change
2021-08-02 11:40 Thomas Merk New Issue
2021-08-18 09:10 Randy Armstrong Relationship added related to 0007119
2021-08-18 09:10 Randy Armstrong Assigned To => Randy Armstrong
2021-08-18 09:10 Randy Armstrong Status new => resolved
2021-08-18 09:10 Randy Armstrong Resolution open => fixed
2021-08-18 09:10 Randy Armstrong Note Added: 0014760
2021-08-31 17:04 Jim Luth Status resolved => closed
2021-08-31 17:04 Jim Luth Note Added: 0014802
2021-10-25 12:55 Thomas Merk Status closed => feedback
2021-10-25 12:55 Thomas Merk Resolution fixed => reopened
2021-10-25 12:55 Thomas Merk Note Added: 0015210
2021-11-16 17:29 Randy Armstrong Status feedback => resolved
2021-11-16 17:29 Randy Armstrong Note Added: 0015316
2021-11-16 17:30 Jim Luth Status resolved => closed
2021-11-16 17:30 Jim Luth Fixed in Version => 1.05.01 RC1
2021-11-16 17:30 Jim Luth Note Added: 0015317