File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -855,6 +855,20 @@ def test_read_table_filters_projection_without_filter_column(tempdir):
855855 assert result ['value' ].to_pylist () == [16 , 17 , 18 , 19 ]
856856
857857
858+ def test_read_table_filters_empty_projection_path (tempdir ):
859+ """Path-like reads should preserve filtered row count with columns=[]."""
860+ from pyarrow import orc
861+ import pyarrow .dataset as ds
862+
863+ path = str (tempdir / 'projection_empty.orc' )
864+ table = pa .table ({'id' : range (10 ), 'value' : range (10 )})
865+ orc .write_table (table , path )
866+
867+ result = orc .read_table (path , columns = [], filters = ds .field ('id' ) > 5 )
868+ assert result .num_rows == 4
869+ assert result .num_columns == 0
870+
871+
858872def test_parquet_orc_predicate_pushdown_parity (tempdir ):
859873 """Equivalent ORC and Parquet predicates should produce equal results."""
860874 from pyarrow import orc
You can’t perform that action at this time.
0 commit comments