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

Function test_dataset_union

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

Source from the content-addressed store, hash-verified

3172
3173
3174def test_dataset_union(multisourcefs):
3175 child = ds.FileSystemDatasetFactory(
3176 multisourcefs, fs.FileSelector('/plain'),
3177 format=ds.ParquetFileFormat()
3178 )
3179 factory = ds.UnionDatasetFactory([child])
3180
3181 # TODO(bkietz) reintroduce factory.children property
3182 assert len(factory.inspect_schemas()) == 1
3183 assert all(isinstance(s, pa.Schema) for s in factory.inspect_schemas())
3184 assert factory.inspect_schemas()[0].equals(child.inspect())
3185 assert factory.inspect().equals(child.inspect())
3186 assert isinstance(factory.finish(), ds.Dataset)
3187
3188
3189def 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