File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -840,6 +840,21 @@ def test_read_table_filters_buffer_reader_fallback_empty_projection():
840840 assert result .num_columns == 0
841841
842842
843+ def test_read_table_filters_projection_without_filter_column (tempdir ):
844+ """Path-like reads should filter using hidden columns and project output."""
845+ from pyarrow import orc
846+ import pyarrow .dataset as ds
847+
848+ path = str (tempdir / 'projection_filter.orc' )
849+ table = pa .table ({'id' : range (10 ), 'value' : range (10 , 20 )})
850+ orc .write_table (table , path )
851+
852+ result = orc .read_table (path , columns = ['value' ], filters = ds .field ('id' ) > 5 )
853+ assert result .num_rows == 4
854+ assert result .column_names == ['value' ]
855+ assert result ['value' ].to_pylist () == [16 , 17 , 18 , 19 ]
856+
857+
843858def test_parquet_orc_predicate_pushdown_parity (tempdir ):
844859 """Equivalent ORC and Parquet predicates should produce equal results."""
845860 from pyarrow import orc
You can’t perform that action at this time.
0 commit comments