fsaintjacques commented on a change in pull request #7000: URL: https://github.com/apache/arrow/pull/7000#discussion_r412452967
########## File path: python/pyarrow/tests/test_dataset.py ########## @@ -671,41 +669,29 @@ def test_fragments(tempdir): f = fragments[0] # file's schema does not include partition column - phys_schema = f.schema.remove(f.schema.get_field_index('part')) - assert f.format.inspect(f.path, f.filesystem) == phys_schema + assert f.physical_schema.names == ['f1', 'f2'] + assert f.format.inspect(f.path, f.filesystem) == f.physical_schema assert f.partition_expression.equals(ds.field('part') == 'a') # scanning fragment includes partition columns - result = f.to_table() - assert f.schema == result.schema + result = f.to_table(schema=dataset.schema) assert result.column_names == ['f1', 'f2', 'part'] - assert len(result) == 4 assert result.equals(table.slice(0, 4)) - - # scanning fragments follow column projection - fragments = list(dataset.get_fragments(columns=['f1', 'part'])) Review comment: Via kwargs to `self._scanner` then forwarding kwargs to `Scanner.from_fragment` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org