hiroyuki-sato commented on code in PR #46305:
URL: https://github.com/apache/arrow/pull/46305#discussion_r2072527506


##########
c_glib/arrow-glib/basic-data-type.cpp:
##########
@@ -2267,6 +2269,37 @@ 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:
+ *
+ * Returns: The newly created fixed shape tensor data type.
+ */
+GArrowFixedShapeTensorDataType *
+garrow_fixed_shape_tensor_data_type_new(void)
+{
+  auto arrow_data_type = arrow::GetExtensionType("arrow.fixed_shape_tensor");

Review Comment:
   Could you check this part correct?



##########
c_glib/arrow-glib/basic-data-type.cpp:
##########
@@ -2267,6 +2269,37 @@ 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:
+ *
+ * Returns: The newly created fixed shape tensor data type.
+ */
+GArrowFixedShapeTensorDataType *
+garrow_fixed_shape_tensor_data_type_new(void)
+{
+  auto arrow_data_type = arrow::GetExtensionType("arrow.fixed_shape_tensor");
+  GArrowFixedShapeTensorDataType *data_type = 
GARROW_FIXED_SHAPE_TENSOR_DATA_TYPE(
+    g_object_new(GARROW_TYPE_FIXED_SHAPE_TENSOR_DATA_TYPE,
+                 "data-type",
+                 &arrow_data_type,
+                 NULL));
+  return data_type;
+}
+

Review Comment:
   @kou Should I move to outside of  `G_BEGIN_DECLS ` ~ `G_END_DECLS ` parts?



-- 
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