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

Function test_incompatible_schema_hang

python/pyarrow/tests/test_dataset.py:3351–3365  ·  view source on GitHub ↗
(tempdir, dataset_reader)

Source from the content-addressed store, hash-verified

3349
3350@pytest.mark.parquet
3351def test_incompatible_schema_hang(tempdir, dataset_reader):
3352 # ARROW-13480: deadlock when reading past an errored fragment
3353
3354 fn = tempdir / "data.parquet"
3355 table = pa.table({'a': [1, 2, 3]})
3356 pq.write_table(table, fn)
3357
3358 schema = pa.schema([('a', pa.null())])
3359 dataset = ds.dataset([str(fn)] * 100, schema=schema)
3360 assert dataset.schema.equals(schema)
3361 scanner = dataset_reader.scanner(dataset)
3362 with pytest.raises(NotImplementedError,
3363 match='Unsupported cast from int64 to null'):
3364 reader = scanner.to_reader()
3365 reader.read_all()
3366
3367
3368def test_ipc_format(tempdir, dataset_reader):

Callers

nothing calls this directly

Calls 4

equalsMethod · 0.80
scannerMethod · 0.80
write_tableMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected