Skip to content

Commit

Permalink
GH-44918: [Ruby] Fix a bug that empty list is ignored in builder
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Dec 4, 2024
1 parent 50f2d6e commit 70abedb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ruby/red-arrow/lib/arrow/list-array-builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def append_value(*args)
when nil
append_null
when ::Array
return if value.empty?
append_value_raw
return if value.empty?
@value_builder ||= value_builder
@value_builder.append(*value)
else
Expand Down
2 changes: 1 addition & 1 deletion ruby/red-arrow/test/test-list-array-builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setup
builder = Arrow::ListArrayBuilder.new(data_type)
builder.append_value([])
array = builder.finish
assert_equal([], array[0].to_a)
assert_equal([[]], array.to_a)
end
end

Expand Down

0 comments on commit 70abedb

Please sign in to comment.