lib/arrow/array-builder.rb in red-arrow-2.0.0 vs lib/arrow/array-builder.rb in red-arrow-3.0.0

- old
+ new

@@ -113,10 +113,21 @@ when Date { builder: Date32ArrayBuilder.new, detected: true, } + when BigDecimal + if value.to_arrow.is_a?(Decimal128) + { + builder: Decimal128ArrayBuilder.new, + } + else + { + builder: Decimal256ArrayBuilder.new, + detected: true, + } + end when ::Array sub_builder_info = nil value.each do |sub_value| sub_builder_info = detect_builder_info(sub_value, sub_builder_info) break if sub_builder_info and sub_builder_info[:detected] @@ -190,15 +201,9 @@ end append_values(target_values, nil) else append_nulls(current_index - start_index) end - end - end - - def append_nulls(n) - n.times do - append_null end end end end