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

Function test_read_column_duplicated_selection

python/pyarrow/tests/test_feather.py:769–779  ·  view source on GitHub ↗
(tempdir, version)

Source from the content-addressed store, hash-verified

767
768
769def test_read_column_duplicated_selection(tempdir, version):
770 # duplicated columns in the column selection
771 table = pa.table([[1, 2, 3], [4, 5, 6], [7, 8, 9]], names=['a', 'b', 'c'])
772 path = str(tempdir / "data.feather")
773 write_feather(table, path, version=version)
774
775 expected = pa.table([[1, 2, 3], [4, 5, 6], [1, 2, 3]],
776 names=['a', 'b', 'a'])
777 for col_selection in [['a', 'b', 'a'], [0, 1, 0]]:
778 result = read_table(path, columns=col_selection)
779 assert result.equals(expected)
780
781
782def test_read_column_duplicated_in_file(tempdir):

Callers

nothing calls this directly

Calls 3

write_featherFunction · 0.90
read_tableFunction · 0.90
equalsMethod · 0.80

Tested by

no test coverage detected