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

Source from the content-addressed store, hash-verified

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