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:783–793  ·  view source on GitHub ↗
(tempdir, version)

Source from the content-addressed store, hash-verified

781
782
783def test_read_column_duplicated_selection(tempdir, version):
784 # duplicated columns in the column selection
785 table = pa.table([[1, 2, 3], [4, 5, 6], [7, 8, 9]], names=['a', 'b', 'c'])
786 path = str(tempdir / "data.feather")
787 write_feather(table, path, version=version)
788
789 expected = pa.table([[1, 2, 3], [4, 5, 6], [1, 2, 3]],
790 names=['a', 'b', 'a'])
791 for col_selection in [['a', 'b', 'a'], [0, 1, 0]]:
792 result = read_table(path, columns=col_selection)
793 assert result.equals(expected)
794
795
796def 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