MCPcopy Create free account
hub / github.com/apache/arrow / test_dataset_union

Function test_dataset_union

python/pyarrow/tests/test_dataset.py:3179–3191  ·  view source on GitHub ↗
(multisourcefs)

Source from the content-addressed store, hash-verified

3177
3178
3179def test_dataset_union(multisourcefs):
3180 child = ds.FileSystemDatasetFactory(
3181 multisourcefs, fs.FileSelector('/plain'),
3182 format=ds.ParquetFileFormat()
3183 )
3184 factory = ds.UnionDatasetFactory([child])
3185
3186 # TODO(bkietz) reintroduce factory.children property
3187 assert len(factory.inspect_schemas()) == 1
3188 assert all(isinstance(s, pa.Schema) for s in factory.inspect_schemas())
3189 assert factory.inspect_schemas()[0].equals(child.inspect())
3190 assert factory.inspect().equals(child.inspect())
3191 assert isinstance(factory.finish(), ds.Dataset)
3192
3193
3194def test_union_dataset_from_other_datasets(tempdir, multisourcefs):

Callers

nothing calls this directly

Calls 6

lenFunction · 0.85
ParquetFileFormatMethod · 0.80
equalsMethod · 0.80
inspectMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected