rok commented on code in PR #33925:
URL: https://github.com/apache/arrow/pull/33925#discussion_r1090419538


##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -72,4 +72,28 @@ same rules as laid out above, and provide backwards 
compatibility guarantees.
 Official List
 =============
 
-No canonical extension types have been standardized yet.
+Fixed size tensor
+=================
+
+* Extension name: `arrow.fixed_size_tensor`.
+
+* The storage type of the extension: ``List``.

Review Comment:
   I think we'd want 
[FixedSizeList](https://github.com/apache/arrow/blob/master/format/Schema.fbs#L99)
 for fixed size tensor.
   ```suggestion
   * The storage type of the extension: ``FixedSizeList``.
   ```



##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -72,4 +72,28 @@ same rules as laid out above, and provide backwards 
compatibility guarantees.
 Official List
 =============
 
-No canonical extension types have been standardized yet.
+Fixed size tensor
+=================
+
+* Extension name: `arrow.fixed_size_tensor`.
+
+* The storage type of the extension: ``List``.
+
+* Extension type parameters:
+
+  * **value_type** = pyarrow DataType of the tensor elements
+  * **shape** = shape of the contained tensors as a tuple
+  * **order** = string indicating the order of elements in memory;
+    ‘C’ for row major order and ‘F’ for column major order

Review Comment:
   Perhaps we should store this as `is_row_major` boolean instead?



##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -72,4 +72,28 @@ same rules as laid out above, and provide backwards 
compatibility guarantees.
 Official List
 =============
 
-No canonical extension types have been standardized yet.
+Fixed size tensor
+=================
+
+* Extension name: `arrow.fixed_size_tensor`.
+
+* The storage type of the extension: ``List``.
+
+* Extension type parameters:
+
+  * **value_type** = pyarrow DataType of the tensor elements
+  * **shape** = shape of the contained tensors as a tuple
+  * **order** = string indicating the order of elements in memory;
+    ‘C’ for row major order and ‘F’ for column major order
+
+* Description of the serialization:
+
+  The metadata MUST be a valid JSON object including:
+
+  * shape of the contained tensors as a tuple with key “shape”,

Review Comment:
   I think it's called array in JSON.
   ```suggestion
     * shape of the contained tensors as an array with key “shape”,
   ```



##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -72,4 +72,28 @@ same rules as laid out above, and provide backwards 
compatibility guarantees.
 Official List
 =============
 
-No canonical extension types have been standardized yet.
+Fixed size tensor
+=================
+
+* Extension name: `arrow.fixed_size_tensor`.
+
+* The storage type of the extension: ``List``.
+
+* Extension type parameters:
+
+  * **value_type** = pyarrow DataType of the tensor elements

Review Comment:
   ```suggestion
     * **value_type** = Arrow DataType of the tensor elements
   ```



##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -72,4 +72,28 @@ same rules as laid out above, and provide backwards 
compatibility guarantees.
 Official List
 =============
 
-No canonical extension types have been standardized yet.
+Fixed size tensor
+=================
+
+* Extension name: `arrow.fixed_size_tensor`.
+
+* The storage type of the extension: ``List``.
+
+* Extension type parameters:
+
+  * **value_type** = pyarrow DataType of the tensor elements
+  * **shape** = shape of the contained tensors as a tuple
+  * **order** = string indicating the order of elements in memory;
+    ‘C’ for row major order and ‘F’ for column major order
+
+* Description of the serialization:
+
+  The metadata MUST be a valid JSON object including:
+
+  * shape of the contained tensors as a tuple with key “shape”,
+  * string defining the order of elements in memory with key “order”.
+
+  For example: `{ “shape”: (2, 5), “order”: ‘C’}`

Review Comment:
   ```suggestion
     For example: `{ “shape”: [2, 5], “is_row_major”: true, "metadata": {...}}`
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to