You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "stenlarsson (via GitHub)" <gi...@apache.org> on 2025/12/14 14:15:21 UTC

[PR] GH-48484: [GLib][Ruby] Add GArrowListFlattenOptions [arrow]

stenlarsson opened a new pull request, #48487:
URL: https://github.com/apache/arrow/pull/48487

   ### Rationale for this change
   
   The `ListFlattenOptions` class is not available in GLib/Ruby, and it is used together with the `list_flatten` compute function.
   
   ### What changes are included in this PR?
   
   This adds the `ListFlattenOptions` class to GLib.
   
   ### Are these changes tested?
   
   
   ### Are there any user-facing changes?
   
   **This PR includes breaking changes to public APIs.** (If there are any breaking changes to public APIs, please explain which changes are breaking. If not, you can remove this.)
   
   **This PR contains a "Critical Fix".** (If the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld), please provide explanation. If not, you can remove this.)
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48486: [GLib][Ruby] Add GArrowListFlattenOptions [arrow]

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #48487:
URL: https://github.com/apache/arrow/pull/48487#issuecomment-3674732589

   Thanks @stenlarsson for this work! That sounds good to me. Maybe you could mark them as draft so it's easier to find the one that is currently expected to be reviewed but as soon as you and @kou are happy with the approach to know the next one to review, that certainly works!


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48486: [GLib][Ruby] Add GArrowListFlattenOptions [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #48487:
URL: https://github.com/apache/arrow/pull/48487#issuecomment-3651152513

   :warning: GitHub issue #48486 **has been automatically assigned in GitHub** to PR creator.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48486: [GLib][Ruby] Add GArrowListFlattenOptions [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #48487:
URL: https://github.com/apache/arrow/pull/48487


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48486: [GLib][Ruby] Add GArrowListFlattenOptions [arrow]

Posted by "stenlarsson (via GitHub)" <gi...@apache.org>.
stenlarsson commented on PR #48487:
URL: https://github.com/apache/arrow/pull/48487#issuecomment-3674725492

   @raulcd This is expected. I initially created one large PR to avoid conflicts, but @kou asked me to open separate PRs, see https://github.com/apache/arrow/pull/48357#issuecomment-3616543303.
   
   Now that the PRs are already opened, I suggest that I rebase one every time one is merged, ok? I started with this one.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48486: [GLib][Ruby] Add GArrowListFlattenOptions [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #48487:
URL: https://github.com/apache/arrow/pull/48487#discussion_r2634871030


##########
c_glib/test/test-list-flatten-options.rb:
##########
@@ -0,0 +1,58 @@
+# 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 TestListFlattenOptions < Test::Unit::TestCase
+  include Helper::Buildable
+
+  def setup
+    @options = Arrow::ListFlattenOptions.new
+  end
+
+  def test_recursive_property
+    assert do
+      !@options.recursive?
+    end
+    @options.recursive = true
+    assert do
+      @options.recursive?
+    end
+  end
+
+  def test_list_flatten_function_recursive
+    list_data_type = Arrow::ListDataType.new(Arrow::Field.new("value", Arrow::Int8DataType.new))
+    nested_list = build_list_array(list_data_type, [[[1, 2], [3]], [[4, 5]]])
+
+    args = [
+      Arrow::ArrayDatum.new(nested_list),
+    ]
+    list_flatten_function = Arrow::Function.find("list_flatten")
+
+    @options.recursive = false
+    result = list_flatten_function.execute(args, @options).value
+    assert_equal(list_data_type,
+                 result.value_data_type)
+    assert_equal(build_list_array(Arrow::Int8DataType.new, [[1, 2], [3], [4, 5]]),
+                 result)
+
+    @options.recursive = true
+    result = list_flatten_function.execute(args, @options).value
+    assert_equal(Arrow::Int8DataType.new,
+                 result.value_data_type)

Review Comment:
   This is redundant. `assert_equal(build_int8_array, result)` checks data type too.
   
   ```suggestion
   ```



##########
c_glib/test/test-list-flatten-options.rb:
##########
@@ -0,0 +1,58 @@
+# 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 TestListFlattenOptions < Test::Unit::TestCase
+  include Helper::Buildable
+
+  def setup
+    @options = Arrow::ListFlattenOptions.new
+  end
+
+  def test_recursive_property
+    assert do
+      !@options.recursive?
+    end
+    @options.recursive = true
+    assert do
+      @options.recursive?
+    end
+  end
+
+  def test_list_flatten_function_recursive
+    list_data_type = Arrow::ListDataType.new(Arrow::Field.new("value", Arrow::Int8DataType.new))
+    nested_list = build_list_array(list_data_type, [[[1, 2], [3]], [[4, 5]]])
+
+    args = [
+      Arrow::ArrayDatum.new(nested_list),
+    ]
+    list_flatten_function = Arrow::Function.find("list_flatten")
+
+    @options.recursive = false
+    result = list_flatten_function.execute(args, @options).value
+    assert_equal(list_data_type,
+                 result.value_data_type)

Review Comment:
   This is redundant.
   
   ```suggestion
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-48486: [GLib][Ruby] Add GArrowListFlattenOptions [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #48487:
URL: https://github.com/apache/arrow/pull/48487#issuecomment-3691835803

   After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit c342ac57515d34063c957ca06932a7c0d5416eca.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/58935807142) has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org