kou commented on code in PR #46305:
URL: https://github.com/apache/arrow/pull/46305#discussion_r2075541397
##########
c_glib/arrow-glib/basic-data-type.cpp:
##########
@@ -2267,6 +2271,83 @@ garrow_string_view_data_type_new(void)
return data_type;
}
+G_DEFINE_TYPE(GArrowFixedShapeTensorDataType,
+ garrow_fixed_shape_tensor_data_type,
+ GARROW_TYPE_EXTENSION_DATA_TYPE)
+
+static void
+garrow_fixed_shape_tensor_data_type_init(GArrowFixedShapeTensorDataType
*object)
+{
+}
+
+static void
+garrow_fixed_shape_tensor_data_type_class_init(GArrowFixedShapeTensorDataTypeClass
*klass)
+{
+}
+
+/**
+ * garrow_fixed_shape_tensor_data_type_new:
+ * @value_type: A #GArrowDataType of individual tensor elements.
+ * @shape: (array length=shape_length): A physical shape of the contained
tensors as an
+ * array.
+ * @shape_length: The length of `shape`.
+ * @permutation: (array length=permutation_length): An indices of the desired
ordering of
+ * the original dimensions, defined as an array. This must be `NULL` or the
same length
+ * array of `shape`.
+ * @permutation_length: The length of `permutation`.
+ * @dim_names: (array length=n_dim_names): Explicit names to tensor dimensions
as an
+ * array. This must be `NULL` or the same length array of `shape`.
+ * @n_dim_names. The length of `dim_names`.
+ * @error: (nullable): Return location for a #GError or %NULL.
+ *
+ * Returns: The newly created fixed shape tensor data type.
+ */
+GArrowFixedShapeTensorDataType *
+garrow_fixed_shape_tensor_data_type_new(GArrowDataType *value_type,
+ const gint64 *shape,
+ gint32 shape_length,
Review Comment:
Could you use `gsize` like other functions?
```suggestion
gsize shape_length,
```
##########
c_glib/arrow-glib/basic-data-type.cpp:
##########
@@ -2267,6 +2271,83 @@ garrow_string_view_data_type_new(void)
return data_type;
}
+G_DEFINE_TYPE(GArrowFixedShapeTensorDataType,
+ garrow_fixed_shape_tensor_data_type,
+ GARROW_TYPE_EXTENSION_DATA_TYPE)
+
+static void
+garrow_fixed_shape_tensor_data_type_init(GArrowFixedShapeTensorDataType
*object)
+{
+}
+
+static void
+garrow_fixed_shape_tensor_data_type_class_init(GArrowFixedShapeTensorDataTypeClass
*klass)
+{
+}
+
+/**
+ * garrow_fixed_shape_tensor_data_type_new:
+ * @value_type: A #GArrowDataType of individual tensor elements.
+ * @shape: (array length=shape_length): A physical shape of the contained
tensors as an
+ * array.
Review Comment:
```suggestion
* array.
```
##########
c_glib/arrow-glib/basic-data-type.cpp:
##########
@@ -2267,6 +2271,83 @@ garrow_string_view_data_type_new(void)
return data_type;
}
+G_DEFINE_TYPE(GArrowFixedShapeTensorDataType,
+ garrow_fixed_shape_tensor_data_type,
+ GARROW_TYPE_EXTENSION_DATA_TYPE)
+
+static void
+garrow_fixed_shape_tensor_data_type_init(GArrowFixedShapeTensorDataType
*object)
+{
+}
+
+static void
+garrow_fixed_shape_tensor_data_type_class_init(GArrowFixedShapeTensorDataTypeClass
*klass)
+{
+}
+
+/**
+ * garrow_fixed_shape_tensor_data_type_new:
+ * @value_type: A #GArrowDataType of individual tensor elements.
+ * @shape: (array length=shape_length): A physical shape of the contained
tensors as an
+ * array.
+ * @shape_length: The length of `shape`.
+ * @permutation: (array length=permutation_length): An indices of the desired
ordering of
+ * the original dimensions, defined as an array. This must be `NULL` or the
same length
+ * array of `shape`.
+ * @permutation_length: The length of `permutation`.
+ * @dim_names: (array length=n_dim_names): Explicit names to tensor dimensions
as an
+ * array. This must be `NULL` or the same length array of `shape`.
Review Comment:
```suggestion
* array. This must be `NULL` or the same length array of `shape`.
```
##########
c_glib/arrow-glib/basic-data-type.cpp:
##########
@@ -2267,6 +2271,83 @@ garrow_string_view_data_type_new(void)
return data_type;
}
+G_DEFINE_TYPE(GArrowFixedShapeTensorDataType,
+ garrow_fixed_shape_tensor_data_type,
+ GARROW_TYPE_EXTENSION_DATA_TYPE)
+
+static void
+garrow_fixed_shape_tensor_data_type_init(GArrowFixedShapeTensorDataType
*object)
+{
+}
+
+static void
+garrow_fixed_shape_tensor_data_type_class_init(GArrowFixedShapeTensorDataTypeClass
*klass)
+{
+}
+
+/**
+ * garrow_fixed_shape_tensor_data_type_new:
+ * @value_type: A #GArrowDataType of individual tensor elements.
+ * @shape: (array length=shape_length): A physical shape of the contained
tensors as an
+ * array.
+ * @shape_length: The length of `shape`.
+ * @permutation: (array length=permutation_length): An indices of the desired
ordering of
+ * the original dimensions, defined as an array. This must be `NULL` or the
same length
+ * array of `shape`.
Review Comment:
```suggestion
* the original dimensions, defined as an array. This must be `NULL` or
the same length
* array of `shape`.
```
--
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]