kou opened a new pull request, #44933:
URL: https://github.com/apache/arrow/pull/44933
### Rationale for this change
`Arrow::ListArrayBuilder#append_value` with `[]` must append an empty list
as an element. In general, it works but it doesn't work when list item is
struct or list. Because `Arrow::{List,Struct}ArrayBuilder#append` without
arguments appends an element. It's for a backward compatibility. But it has a
problem for this case.
For example, the following case has this problem:
```ruby
item_type = Arrow::StructDataType.new([{name: "visible", type: :boolean}])
data_type = Arrow::ListDataType.new(name: "struct", data_type: item_type)
builder = Arrow::ListArrayBuilder.new(data_type)
builder.append_value([])
array = builder.finish
array.to_a # => must be [[]] but [] without this change
```
### What changes are included in this PR?
This should be fixed by GH-44763 but the fix was wrong. This change fixes
wrong `return if` location.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Yes.
--
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]