MCPcopy Create free account
hub / github.com/apache/arrow / test_column_names

Method test_column_names

c_glib/test/test-csv-reader.rb:196–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194 end
195
196 def test_column_names
197 options = Arrow::CSVReadOptions.new
198 column_names = ["message", "count"]
199 options.column_names = column_names
200 assert_equal(column_names, options.column_names)
201
202 table = Arrow::CSVReader.new(open_input(<<-CSV), options)
203"Start",2
204"Shutdown",9
205"Reboot",5
206 CSV
207 columns = {
208 "message" => build_string_array(["Start", "Shutdown", "Reboot"]),
209 "count" => build_int64_array([2, 9, 5]),
210 }
211 assert_equal(build_table(columns),
212 table.read)
213 end
214
215 def test_add_column_name
216 options = Arrow::CSVReadOptions.new

Callers

nothing calls this directly

Calls 3

newMethod · 0.45
column_namesMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected