From 66fa6f39408ef48596cc5a48d5554a1c3d2a80a4 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Mon, 2 Jun 2025 09:45:07 +0900 Subject: [PATCH 01/30] GH-46773: [GLib] Add GArrowFixedSizeListDataType --- c_glib/arrow-glib/composite-data-type.cpp | 60 +++++++++++++++++++ c_glib/arrow-glib/composite-data-type.h | 21 +++++++ c_glib/test/test-fixed-size-list-data-type.rb | 51 ++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 c_glib/test/test-fixed-size-list-data-type.rb diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 8af1b0c8626..769c12aa8ab 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -767,4 +767,64 @@ garrow_run_end_encoded_data_type_get_value_data_type( return garrow_data_type_new_raw(&arrow_value_data_type); } +G_DEFINE_TYPE(GArrowFixedSizeListDataType, + garrow_fixed_size_list_data_type, + GARROW_TYPE_BASE_LIST_DATA_TYPE) + +static void +garrow_fixed_size_list_data_type_init(GArrowFixedSizeListDataType *object) +{ +} + +static void +garrow_fixed_size_list_data_type_class_init(GArrowFixedSizeListDataTypeClass *klass) +{ +} + +/** + * garrow_fixed_size_list_data_type_new_data_type: + * @data_type: The data type of elements. + * @list_size: The size of value. + * + * Returns: (transfer full) : The newly created fixed size list data type. + * + * Since: 21.0.0 + */ +GArrowFixedSizeListDataType * +garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *data_type, + gint32 list_size) +{ + auto arrow_data_type = garrow_data_type_get_raw(data_type); + + auto arrow_fixed_size_list_data_type = + std::make_shared(arrow_data_type, list_size); + return GARROW_FIXED_SIZE_LIST_DATA_TYPE( + g_object_new(GARROW_TYPE_FIXED_SIZE_LIST_DATA_TYPE, + "data-type", + &arrow_fixed_size_list_data_type, + nullptr)); +} + +/** + * garrow_fixed_size_list_data_type_new_field: + * @field: The field of elements. + * @list_size: The size of value. + * + * Returns: (transfer full) : The newly created fixed size list data type. + * + * Since: 21.0.0 + */ +GArrowFixedSizeListDataType * +garrow_fixed_size_list_data_type_new_field(GArrowField *field, gint32 list_size) +{ + auto arrow_field = garrow_field_get_raw(field); + + auto arrow_fixed_size_list_data_type = + std::make_shared(arrow_field, list_size); + return GARROW_FIXED_SIZE_LIST_DATA_TYPE( + g_object_new(GARROW_TYPE_FIXED_SIZE_LIST_DATA_TYPE, + "data-type", + &arrow_fixed_size_list_data_type, + nullptr)); +} G_END_DECLS diff --git a/c_glib/arrow-glib/composite-data-type.h b/c_glib/arrow-glib/composite-data-type.h index de9449c41cf..cb8259e1b5c 100644 --- a/c_glib/arrow-glib/composite-data-type.h +++ b/c_glib/arrow-glib/composite-data-type.h @@ -256,4 +256,25 @@ GArrowDataType * garrow_run_end_encoded_data_type_get_value_data_type( GArrowRunEndEncodedDataType *data_type); +#define GARROW_TYPE_FIXED_SIZE_LIST_DATA_TYPE \ + (garrow_fixed_size_list_data_type_get_type()) +GARROW_AVAILABLE_IN_21_0 +G_DECLARE_DERIVABLE_TYPE(GArrowFixedSizeListDataType, + garrow_fixed_size_list_data_type, + GARROW, + FIXED_SIZE_LIST_DATA_TYPE, + GArrowBaseListDataType) +struct _GArrowFixedSizeListDataTypeClass +{ + GArrowBaseListDataTypeClass parent_class; +}; + +GARROW_AVAILABLE_IN_21_0 +GArrowFixedSizeListDataType * +garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *data_type, + gint32 list_size); + +GARROW_AVAILABLE_IN_21_0 +GArrowFixedSizeListDataType * +garrow_fixed_size_list_data_type_new_field(GArrowField *field, gint32 list_size); G_END_DECLS diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb new file mode 100644 index 00000000000..607d227fe40 --- /dev/null +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -0,0 +1,51 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +class TestFixedSizeListDataType < Test::Unit::TestCase + sub_test_case(".new") do + def setup + @list_type = Arrow::BooleanDataType.new + @list_size = 5 + @list_name = "bool_field" + end + + def test_new_field + field = Arrow::Field.new(@list_name, @list_type) + data_type = Arrow::FixedSizeListDataType.new(field, @list_size); + assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); + end + + def test_new_data_type + data_type = Arrow::FixedSizeListDataType.new(@list_type, @list_size); + assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); + end + end + + sub_test_case(".instance_method") do + def setup + @data_type = Arrow::FixedSizeListDataType.new(Arrow::BooleanDataType.new, 5) + end + + def test_name + assert_equal("fixed_size_list", @data_type.name); + end + + def test_to_s + assert_equal("fixed_size_list[5]", @data_type.to_s) + end + end +end From d36815ac2af8889deaae4e7f734d63ffb5623e77 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:23:51 +0900 Subject: [PATCH 02/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 769c12aa8ab..4010ee54802 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -786,7 +786,7 @@ garrow_fixed_size_list_data_type_class_init(GArrowFixedSizeListDataTypeClass *kl * @data_type: The data type of elements. * @list_size: The size of value. * - * Returns: (transfer full) : The newly created fixed size list data type. + * Returns: A newly created fixed size list data type. * * Since: 21.0.0 */ From 5a3b7dc04b6e6675a413a00541c836a07011afe2 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:24:08 +0900 Subject: [PATCH 03/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 4010ee54802..ed4994a1401 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -784,7 +784,7 @@ garrow_fixed_size_list_data_type_class_init(GArrowFixedSizeListDataTypeClass *kl /** * garrow_fixed_size_list_data_type_new_data_type: * @data_type: The data type of elements. - * @list_size: The size of value. + * @list_size: The size of each list. * * Returns: A newly created fixed size list data type. * From 6e4f754df6245db1716b7be3d7156b34e0899c36 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:27:53 +0900 Subject: [PATCH 04/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index ed4994a1401..6292ab5b306 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -791,7 +791,7 @@ garrow_fixed_size_list_data_type_class_init(GArrowFixedSizeListDataTypeClass *kl * Since: 21.0.0 */ GArrowFixedSizeListDataType * -garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *data_type, +garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, gint32 list_size) { auto arrow_data_type = garrow_data_type_get_raw(data_type); From daf545ea3e616c19278d9401e4da072150c47afc Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:28:01 +0900 Subject: [PATCH 05/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 6292ab5b306..be4efd22b3e 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -795,7 +795,6 @@ garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, gint32 list_size) { auto arrow_data_type = garrow_data_type_get_raw(data_type); - auto arrow_fixed_size_list_data_type = std::make_shared(arrow_data_type, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( From 9af3ecca3093122f81dcd7acbbcdf4291a0bd0ca Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:28:10 +0900 Subject: [PATCH 06/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index be4efd22b3e..222bb4d6509 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -796,7 +796,7 @@ garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, { auto arrow_data_type = garrow_data_type_get_raw(data_type); auto arrow_fixed_size_list_data_type = - std::make_shared(arrow_data_type, list_size); + arrow::fixed_size_list(arrow_data_type, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( g_object_new(GARROW_TYPE_FIXED_SIZE_LIST_DATA_TYPE, "data-type", From 539d3facb9d63ce278df91d78bb67545a57a9fda Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:28:20 +0900 Subject: [PATCH 07/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 222bb4d6509..a3eae64df05 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -798,10 +798,7 @@ garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, auto arrow_fixed_size_list_data_type = arrow::fixed_size_list(arrow_data_type, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( - g_object_new(GARROW_TYPE_FIXED_SIZE_LIST_DATA_TYPE, - "data-type", - &arrow_fixed_size_list_data_type, - nullptr)); + garrow_data_type_new_raw(&arrow_fixed_size_list_data_type)); } /** From 89c0c025f507774d6975602973987f29f6cbdde5 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:28:28 +0900 Subject: [PATCH 08/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index a3eae64df05..be34f3e497b 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -806,7 +806,7 @@ garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, * @field: The field of elements. * @list_size: The size of value. * - * Returns: (transfer full) : The newly created fixed size list data type. + * Returns: A newly created fixed size list data type. * * Since: 21.0.0 */ From 0174b5acde442f4438243f783c559f703b2bbdd7 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:28:35 +0900 Subject: [PATCH 09/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index be34f3e497b..dcbf50bb1e3 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -814,7 +814,6 @@ GArrowFixedSizeListDataType * garrow_fixed_size_list_data_type_new_field(GArrowField *field, gint32 list_size) { auto arrow_field = garrow_field_get_raw(field); - auto arrow_fixed_size_list_data_type = std::make_shared(arrow_field, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( From 8b3f71dfe95418d7f53ce85c349b398d5e184e5e Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:28:43 +0900 Subject: [PATCH 10/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index dcbf50bb1e3..7e5b022c721 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -815,7 +815,7 @@ garrow_fixed_size_list_data_type_new_field(GArrowField *field, gint32 list_size) { auto arrow_field = garrow_field_get_raw(field); auto arrow_fixed_size_list_data_type = - std::make_shared(arrow_field, list_size); + arrow::fixed_size_list(arrow_field, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( g_object_new(GARROW_TYPE_FIXED_SIZE_LIST_DATA_TYPE, "data-type", From c7a7f15ae7902a522e7eb64500ef61a251d3ba68 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:28:51 +0900 Subject: [PATCH 11/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 7e5b022c721..05055db24a4 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -817,9 +817,6 @@ garrow_fixed_size_list_data_type_new_field(GArrowField *field, gint32 list_size) auto arrow_fixed_size_list_data_type = arrow::fixed_size_list(arrow_field, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( - g_object_new(GARROW_TYPE_FIXED_SIZE_LIST_DATA_TYPE, - "data-type", - &arrow_fixed_size_list_data_type, - nullptr)); + garrow_data_type_new_raw(&arrow_fixed_size_list_data_type)); } G_END_DECLS From 3378ed65d956bc1b5c98b21c34c8bc7d0db97983 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:28:58 +0900 Subject: [PATCH 12/30] Update c_glib/test/test-fixed-size-list-data-type.rb Co-authored-by: Sutou Kouhei --- c_glib/test/test-fixed-size-list-data-type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index 607d227fe40..9bd07dee79d 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -20,7 +20,7 @@ class TestFixedSizeListDataType < Test::Unit::TestCase def setup @list_type = Arrow::BooleanDataType.new @list_size = 5 - @list_name = "bool_field" + @field_name = "bool_field" end def test_new_field From 203b45f1f19e90f0d72857ea2573d72992fc0b33 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:29:06 +0900 Subject: [PATCH 13/30] Update c_glib/test/test-fixed-size-list-data-type.rb Co-authored-by: Sutou Kouhei --- c_glib/test/test-fixed-size-list-data-type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index 9bd07dee79d..ba68c9f4c45 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -18,7 +18,7 @@ class TestFixedSizeListDataType < Test::Unit::TestCase sub_test_case(".new") do def setup - @list_type = Arrow::BooleanDataType.new + @value_type = Arrow::BooleanDataType.new @list_size = 5 @field_name = "bool_field" end From 300648a261d6466ce2bbdfa5232d43a1c7726eaf Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:29:13 +0900 Subject: [PATCH 14/30] Update c_glib/test/test-fixed-size-list-data-type.rb Co-authored-by: Sutou Kouhei --- c_glib/test/test-fixed-size-list-data-type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index ba68c9f4c45..abfd43734c5 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -35,7 +35,7 @@ def test_new_data_type end end - sub_test_case(".instance_method") do + sub_test_case("instance_methods") do def setup @data_type = Arrow::FixedSizeListDataType.new(Arrow::BooleanDataType.new, 5) end From f68e01c87d543de225c35026195a7e8dda2531e6 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:29:20 +0900 Subject: [PATCH 15/30] Update c_glib/test/test-fixed-size-list-data-type.rb Co-authored-by: Sutou Kouhei --- c_glib/test/test-fixed-size-list-data-type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index abfd43734c5..2a4159e0802 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -29,7 +29,7 @@ def test_new_field assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); end - def test_new_data_type + def test_data_type data_type = Arrow::FixedSizeListDataType.new(@list_type, @list_size); assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); end From fad642de76afe1a2feb3b7d3d14b409011754d67 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:29:46 +0900 Subject: [PATCH 16/30] Update c_glib/test/test-fixed-size-list-data-type.rb Co-authored-by: Sutou Kouhei --- c_glib/test/test-fixed-size-list-data-type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index 2a4159e0802..5dab7b1c4c6 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -23,7 +23,7 @@ def setup @field_name = "bool_field" end - def test_new_field + def test_field field = Arrow::Field.new(@list_name, @list_type) data_type = Arrow::FixedSizeListDataType.new(field, @list_size); assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); From 6632e5e20d32bbde7b178018b53df3f06d620e8c Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 11:42:19 +0900 Subject: [PATCH 17/30] GH-46773: [GLib] Add GArrowFixedSizeListDataType --- c_glib/arrow-glib/basic-data-type.cpp | 3 +++ c_glib/arrow-glib/composite-data-type.cpp | 5 ++--- c_glib/test/test-fixed-size-list-data-type.rb | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/c_glib/arrow-glib/basic-data-type.cpp b/c_glib/arrow-glib/basic-data-type.cpp index 27bae3b220e..51fffb73693 100644 --- a/c_glib/arrow-glib/basic-data-type.cpp +++ b/c_glib/arrow-glib/basic-data-type.cpp @@ -2652,6 +2652,9 @@ garrow_data_type_new_raw(std::shared_ptr *arrow_data_type) } type = GARROW_TYPE_EXTENSION_DATA_TYPE; break; + case arrow::Type::type::FIXED_SIZE_LIST: + type = GARROW_TYPE_FIXED_SIZE_LIST_DATA_TYPE; + break; case arrow::Type::type::RUN_END_ENCODED: type = GARROW_TYPE_RUN_END_ENCODED_DATA_TYPE; break; diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 05055db24a4..e0e9c706dc0 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -794,7 +794,7 @@ GArrowFixedSizeListDataType * garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, gint32 list_size) { - auto arrow_data_type = garrow_data_type_get_raw(data_type); + auto arrow_data_type = garrow_data_type_get_raw(value_type); auto arrow_fixed_size_list_data_type = arrow::fixed_size_list(arrow_data_type, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( @@ -814,8 +814,7 @@ GArrowFixedSizeListDataType * garrow_fixed_size_list_data_type_new_field(GArrowField *field, gint32 list_size) { auto arrow_field = garrow_field_get_raw(field); - auto arrow_fixed_size_list_data_type = - arrow::fixed_size_list(arrow_field, list_size); + auto arrow_fixed_size_list_data_type = arrow::fixed_size_list(arrow_field, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( garrow_data_type_new_raw(&arrow_fixed_size_list_data_type)); } diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index 5dab7b1c4c6..20bbba3e8b1 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -24,13 +24,13 @@ def setup end def test_field - field = Arrow::Field.new(@list_name, @list_type) + field = Arrow::Field.new(@field_name, @value_type) data_type = Arrow::FixedSizeListDataType.new(field, @list_size); assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); end def test_data_type - data_type = Arrow::FixedSizeListDataType.new(@list_type, @list_size); + data_type = Arrow::FixedSizeListDataType.new(@value_type, @list_size); assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); end end From 9f6894f22fcf4710237c7c966f7e671d07af9935 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 16:05:57 +0900 Subject: [PATCH 18/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index e0e9c706dc0..71347722622 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -783,7 +783,7 @@ garrow_fixed_size_list_data_type_class_init(GArrowFixedSizeListDataTypeClass *kl /** * garrow_fixed_size_list_data_type_new_data_type: - * @data_type: The data type of elements. + * @value_type: The data type of an element of each list. * @list_size: The size of each list. * * Returns: A newly created fixed size list data type. From 770333050b7073655feb2e4e521fd9fb84203810 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 16:06:06 +0900 Subject: [PATCH 19/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 71347722622..24ca73647c2 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -794,7 +794,7 @@ GArrowFixedSizeListDataType * garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, gint32 list_size) { - auto arrow_data_type = garrow_data_type_get_raw(value_type); + auto arrow_value_type = garrow_data_type_get_raw(value_type); auto arrow_fixed_size_list_data_type = arrow::fixed_size_list(arrow_data_type, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( From 5359b53ddc982a31bfa0eec8dd73d3315091af27 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 16:06:17 +0900 Subject: [PATCH 20/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 24ca73647c2..7bc69b12bfa 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -803,7 +803,7 @@ garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, /** * garrow_fixed_size_list_data_type_new_field: - * @field: The field of elements. + * @field: The field for elements. * @list_size: The size of value. * * Returns: A newly created fixed size list data type. From 64314cc1937e5260f52ee0da9cf8a6d42751260f Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 16:06:26 +0900 Subject: [PATCH 21/30] Update c_glib/arrow-glib/composite-data-type.h Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.h b/c_glib/arrow-glib/composite-data-type.h index cb8259e1b5c..8369ae49870 100644 --- a/c_glib/arrow-glib/composite-data-type.h +++ b/c_glib/arrow-glib/composite-data-type.h @@ -271,7 +271,7 @@ struct _GArrowFixedSizeListDataTypeClass GARROW_AVAILABLE_IN_21_0 GArrowFixedSizeListDataType * -garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *data_type, +garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, gint32 list_size); GARROW_AVAILABLE_IN_21_0 From 9a0e7d5acb8d9a3ffc93a930a9d5715689a60125 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 16:32:23 +0900 Subject: [PATCH 22/30] GH-46773: [GLib] Add GArrowFixedSizeListDataType --- c_glib/arrow-glib/composite-data-type.cpp | 4 ++-- c_glib/test/test-fixed-size-list-data-type.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 7bc69b12bfa..c3ccb2e8bc0 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -796,14 +796,14 @@ garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, { auto arrow_value_type = garrow_data_type_get_raw(value_type); auto arrow_fixed_size_list_data_type = - arrow::fixed_size_list(arrow_data_type, list_size); + arrow::fixed_size_list(arrow_value_type, list_size); return GARROW_FIXED_SIZE_LIST_DATA_TYPE( garrow_data_type_new_raw(&arrow_fixed_size_list_data_type)); } /** * garrow_fixed_size_list_data_type_new_field: - * @field: The field for elements. + * @field: The field of an element of each list. * @list_size: The size of value. * * Returns: A newly created fixed size list data type. diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index 20bbba3e8b1..2484c54d4e6 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -26,11 +26,13 @@ def setup def test_field field = Arrow::Field.new(@field_name, @value_type) data_type = Arrow::FixedSizeListDataType.new(field, @list_size); + assert_equal(Arrow::Type::BOOLEAN, field.data_type.id); assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); end def test_data_type data_type = Arrow::FixedSizeListDataType.new(@value_type, @list_size); + assert_equal(Arrow::Type::BOOLEAN, @value_type.id); assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); end end From 3cfa7bf6ec2b3a4a98cce4450a73563183d0f1cb Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 12 Jun 2025 20:27:11 +0900 Subject: [PATCH 23/30] Fix test --- c_glib/test/test-fixed-size-list-data-type.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index 2484c54d4e6..e64a0829a57 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -25,15 +25,15 @@ def setup def test_field field = Arrow::Field.new(@field_name, @value_type) - data_type = Arrow::FixedSizeListDataType.new(field, @list_size); - assert_equal(Arrow::Type::BOOLEAN, field.data_type.id); - assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); + data_type = Arrow::FixedSizeListDataType.new(field, @list_size) + assert_equal([Arrow::Type::FIXED_SIZE_LIST, "fixed_size_list[5]"], + [data_type.id, data_type.to_s]) end def test_data_type - data_type = Arrow::FixedSizeListDataType.new(@value_type, @list_size); - assert_equal(Arrow::Type::BOOLEAN, @value_type.id); - assert_equal(Arrow::Type::FIXED_SIZE_LIST, data_type.id); + data_type = Arrow::FixedSizeListDataType.new(@value_type, @list_size) + assert_equal([Arrow::Type::FIXED_SIZE_LIST, "fixed_size_list[5]"], + [data_type.id, data_type.to_s]) end end From 62d891112b764a3a855d4d4e6357eb76ed8f8343 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Fri, 13 Jun 2025 12:26:23 +0900 Subject: [PATCH 24/30] Simplified test --- c_glib/test/test-fixed-size-list-data-type.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index e64a0829a57..d8faddb9d98 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -26,14 +26,14 @@ def setup def test_field field = Arrow::Field.new(@field_name, @value_type) data_type = Arrow::FixedSizeListDataType.new(field, @list_size) - assert_equal([Arrow::Type::FIXED_SIZE_LIST, "fixed_size_list[5]"], - [data_type.id, data_type.to_s]) + # TODO: check value_field and list_size separately. + assert_equal("fixed_size_list[5]", data_type.to_s) end def test_data_type data_type = Arrow::FixedSizeListDataType.new(@value_type, @list_size) - assert_equal([Arrow::Type::FIXED_SIZE_LIST, "fixed_size_list[5]"], - [data_type.id, data_type.to_s]) + # TODO: check value_field and list_size separately. + assert_equal("fixed_size_list[5]", data_type.to_s) end end From 11ed2b486a1c88f2acdecc2998cf94f764797d44 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Sat, 14 Jun 2025 12:45:11 +0900 Subject: [PATCH 25/30] Add class description --- c_glib/arrow-glib/composite-data-type.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index c3ccb2e8bc0..035846bad1e 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -51,6 +51,8 @@ G_BEGIN_DECLS * #GArrowDictionaryDataType is a class for dictionary data type. * * #GArrowRunEndEncodedDataType is a class for run end encoded data type. + * + * #GArrowFixedSizeListDataType is a class for fixed size list data type. */ G_DEFINE_TYPE(GArrowBaseListDataType, garrow_base_list_data_type, GARROW_TYPE_DATA_TYPE) From 5519593d3f9d544ec0f4c779d2dd7952c0fdb2af Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Sun, 15 Jun 2025 23:12:17 +0900 Subject: [PATCH 26/30] Implement field and list_size --- c_glib/arrow-glib/composite-data-type.cpp | 71 ++++++++++++++++--- c_glib/arrow-glib/composite-data-type.h | 4 ++ c_glib/test/test-fixed-size-list-data-type.rb | 36 ++++++---- 3 files changed, 89 insertions(+), 22 deletions(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 035846bad1e..1193ca9b42b 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -67,6 +67,25 @@ garrow_base_list_data_type_class_init(GArrowBaseListDataTypeClass *klass) { } +/** + * garrow_base_list_data_type_get_field: + * @base_list_data_type: A #GArrowBaseListDataType. + * + * Returns: (transfer full): The field of value. + * + * Since: 21.0.0 + */ +GArrowField * +garrow_base_list_data_type_get_field(GArrowBaseListDataType *base_list_data_type) +{ + auto data_type = GARROW_DATA_TYPE(base_list_data_type); + auto arrow_data_type = garrow_data_type_get_raw(data_type); + auto arrow_base_list_data_type = std::static_pointer_cast(arrow_data_type); + + auto arrow_field = arrow_base_list_data_type->value_field(); + return garrow_field_new_raw(&arrow_field, nullptr); +} + G_DEFINE_TYPE(GArrowListDataType, garrow_list_data_type, GARROW_TYPE_BASE_LIST_DATA_TYPE) static void @@ -118,16 +137,14 @@ garrow_list_data_type_get_value_field(GArrowListDataType *list_data_type) * Returns: (transfer full): The field of value. * * Since: 0.13.0 + * + * Deprecated: 21.0.0: + * Use garrow_base_list_data_type_get_field() instead. */ GArrowField * garrow_list_data_type_get_field(GArrowListDataType *list_data_type) { - auto data_type = GARROW_DATA_TYPE(list_data_type); - auto arrow_data_type = garrow_data_type_get_raw(data_type); - auto arrow_list_data_type = static_cast(arrow_data_type.get()); - - auto arrow_field = arrow_list_data_type->value_field(); - return garrow_field_new_raw(&arrow_field, nullptr); + return garrow_base_list_data_type_get_field(GARROW_BASE_LIST_DATA_TYPE(list_data_type)); } G_DEFINE_TYPE(GArrowLargeListDataType, garrow_large_list_data_type, GARROW_TYPE_DATA_TYPE) @@ -769,17 +786,55 @@ garrow_run_end_encoded_data_type_get_value_data_type( return garrow_data_type_new_raw(&arrow_value_data_type); } +enum { + PROP_LIST_SIZE = 1 +}; + G_DEFINE_TYPE(GArrowFixedSizeListDataType, garrow_fixed_size_list_data_type, GARROW_TYPE_BASE_LIST_DATA_TYPE) static void -garrow_fixed_size_list_data_type_init(GArrowFixedSizeListDataType *object) -{ +garrow_fixed_size_list_data_type_get_property(GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + auto arrow_data_type = garrow_data_type_get_raw(GARROW_DATA_TYPE(object)); + const auto arrow_fixed_size_list_type = + std::static_pointer_cast(arrow_data_type); + + switch (prop_id) { + case PROP_LIST_SIZE: + g_value_set_int(value, arrow_fixed_size_list_type->list_size()); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); + break; + } } static void garrow_fixed_size_list_data_type_class_init(GArrowFixedSizeListDataTypeClass *klass) +{ + GObjectClass *gobject_class; + GParamSpec *spec; + + gobject_class = G_OBJECT_CLASS(klass); + gobject_class->get_property = garrow_fixed_size_list_data_type_get_property; + + spec = g_param_spec_int("list-size", + "List size", + "The list size of the elements", + G_MININT, + G_MAXINT, + 0, + G_PARAM_READABLE); + g_object_class_install_property(gobject_class, PROP_LIST_SIZE, spec); +} + +static void +garrow_fixed_size_list_data_type_init(GArrowFixedSizeListDataType *object) { } diff --git a/c_glib/arrow-glib/composite-data-type.h b/c_glib/arrow-glib/composite-data-type.h index 8369ae49870..207647bd46a 100644 --- a/c_glib/arrow-glib/composite-data-type.h +++ b/c_glib/arrow-glib/composite-data-type.h @@ -38,6 +38,10 @@ struct _GArrowBaseListDataTypeClass GArrowDataTypeClass parent_class; }; +GARROW_AVAILABLE_IN_21_0 +GArrowField * +garrow_base_list_data_type_get_field(GArrowBaseListDataType *base_list_data_type); + #define GARROW_TYPE_LIST_DATA_TYPE (garrow_list_data_type_get_type()) GARROW_AVAILABLE_IN_ALL G_DECLARE_DERIVABLE_TYPE(GArrowListDataType, diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index d8faddb9d98..43e8079007b 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -17,29 +17,28 @@ class TestFixedSizeListDataType < Test::Unit::TestCase sub_test_case(".new") do - def setup - @value_type = Arrow::BooleanDataType.new - @list_size = 5 - @field_name = "bool_field" - end - def test_field - field = Arrow::Field.new(@field_name, @value_type) - data_type = Arrow::FixedSizeListDataType.new(field, @list_size) - # TODO: check value_field and list_size separately. - assert_equal("fixed_size_list[5]", data_type.to_s) + list_size = 5 + field_name = "bool_field" + field = Arrow::Field.new("bool_field", Arrow::BooleanDataType.new) + data_type = Arrow::FixedSizeListDataType.new(field, list_size) + assert_equal([field, list_size], [data_type.field, data_type.list_size]) end def test_data_type - data_type = Arrow::FixedSizeListDataType.new(@value_type, @list_size) - # TODO: check value_field and list_size separately. - assert_equal("fixed_size_list[5]", data_type.to_s) + value_type = Arrow::BooleanDataType.new + list_size = 5 + data_type = Arrow::FixedSizeListDataType.new(value_type, list_size) + field = Arrow::Field.new("item", value_type) + assert_equal([field, list_size], [data_type.field, data_type.list_size]) end end sub_test_case("instance_methods") do def setup - @data_type = Arrow::FixedSizeListDataType.new(Arrow::BooleanDataType.new, 5) + @list_size = 5 + @value_type =Arrow::BooleanDataType.new + @data_type = Arrow::FixedSizeListDataType.new(@value_type, @list_size) end def test_name @@ -49,5 +48,14 @@ def test_name def test_to_s assert_equal("fixed_size_list[5]", @data_type.to_s) end + + def test_list_size + assert_equal(@list_size, @data_type.list_size) + end + + def test_field + field = Arrow::Field.new("item", @value_type) + assert_equal(field, @data_type.field) + end end end From e2f6c2c2c5e5a3e738db07eef141cb8caf0ed36d Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Mon, 16 Jun 2025 19:48:01 +0900 Subject: [PATCH 27/30] Fix lint --- c_glib/arrow-glib/composite-data-type.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 1193ca9b42b..3d59445b036 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -80,7 +80,8 @@ garrow_base_list_data_type_get_field(GArrowBaseListDataType *base_list_data_type { auto data_type = GARROW_DATA_TYPE(base_list_data_type); auto arrow_data_type = garrow_data_type_get_raw(data_type); - auto arrow_base_list_data_type = std::static_pointer_cast(arrow_data_type); + auto arrow_base_list_data_type = + std::static_pointer_cast(arrow_data_type); auto arrow_field = arrow_base_list_data_type->value_field(); return garrow_field_new_raw(&arrow_field, nullptr); @@ -823,13 +824,13 @@ garrow_fixed_size_list_data_type_class_init(GArrowFixedSizeListDataTypeClass *kl gobject_class = G_OBJECT_CLASS(klass); gobject_class->get_property = garrow_fixed_size_list_data_type_get_property; - spec = g_param_spec_int("list-size", - "List size", - "The list size of the elements", - G_MININT, - G_MAXINT, - 0, - G_PARAM_READABLE); + spec = g_param_spec_int("list-size", + "List size", + "The list size of the elements", + G_MININT, + G_MAXINT, + 0, + G_PARAM_READABLE); g_object_class_install_property(gobject_class, PROP_LIST_SIZE, spec); } From 8a9adecbf183d377e18c0840d30c36d4bda40e02 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Tue, 17 Jun 2025 10:26:48 +0900 Subject: [PATCH 28/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 3d59445b036..bfe88172ac0 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -861,7 +861,7 @@ garrow_fixed_size_list_data_type_new_data_type(GArrowDataType *value_type, /** * garrow_fixed_size_list_data_type_new_field: - * @field: The field of an element of each list. + * @field: The field of lists. * @list_size: The size of value. * * Returns: A newly created fixed size list data type. From e7b4ea4671cca96fae5d95c0d6a10e646bfaffc6 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Tue, 17 Jun 2025 10:27:24 +0900 Subject: [PATCH 29/30] Update c_glib/test/test-fixed-size-list-data-type.rb Co-authored-by: Sutou Kouhei --- c_glib/test/test-fixed-size-list-data-type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/test/test-fixed-size-list-data-type.rb b/c_glib/test/test-fixed-size-list-data-type.rb index 43e8079007b..8266fbccf36 100644 --- a/c_glib/test/test-fixed-size-list-data-type.rb +++ b/c_glib/test/test-fixed-size-list-data-type.rb @@ -37,7 +37,7 @@ def test_data_type sub_test_case("instance_methods") do def setup @list_size = 5 - @value_type =Arrow::BooleanDataType.new + @value_type = Arrow::BooleanDataType.new @data_type = Arrow::FixedSizeListDataType.new(@value_type, @list_size) end From bb75305c9bb03efe6a55141fb8c050c2830d7331 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Tue, 17 Jun 2025 10:27:38 +0900 Subject: [PATCH 30/30] Update c_glib/arrow-glib/composite-data-type.cpp Co-authored-by: Sutou Kouhei --- c_glib/arrow-glib/composite-data-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index bfe88172ac0..3c216867da2 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -827,7 +827,7 @@ garrow_fixed_size_list_data_type_class_init(GArrowFixedSizeListDataTypeClass *kl spec = g_param_spec_int("list-size", "List size", "The list size of the elements", - G_MININT, + 0, G_MAXINT, 0, G_PARAM_READABLE);