Skip to content

Commit 56a0ab1

Browse files
author
Dan Corneanu
committed
Remove redundant assert
1 parent e7e8fa5 commit 56a0ab1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/red_amber/data_frame_variable_operation.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,11 @@ def append_to_fields_and_arrays(appender, fields, arrays, append_to_left)
694694
raise DataFrameArgumentError, "Data size mismatch (#{data.size} != #{size})"
695695
end
696696

697-
a = Arrow::Array.new(data.is_a?(Vector) ? data.to_a : data)
697+
if data.is_a?(Vector)
698+
a = data.data
699+
else
700+
a = Arrow::Array.new(data)
701+
end
698702

699703
if append_to_left
700704
fields.unshift(Arrow::Field.new(key.to_sym, a.value_data_type))

test/test_data_frame_variable_operation.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@ class DataFrameVariableOperationTest < Test::Unit::TestCase
441441

442442
sub_test_case 'Dataframe with zero n_records' do
443443
test 'assign by block' do
444-
assert_equal :double, @df.b.type
445444
str = <<~STR
446445
RedAmber::DataFrame : 0 x 4 Vectors
447446
Vectors : 2 numeric, 1 string, 1 boolean

0 commit comments

Comments
 (0)