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

Function test_dataset_project_null_column

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

Source from the content-addressed store, hash-verified

4076@pytest.mark.parquet
4077@pytest.mark.pandas
4078def test_dataset_project_null_column(tempdir, dataset_reader):
4079 df = pd.DataFrame({"col": np.array([None, None, None], dtype='object')})
4080
4081 f = tempdir / "test_dataset_project_null_column.parquet"
4082 df.to_parquet(f, engine="pyarrow")
4083
4084 dataset = ds.dataset(f, format="parquet",
4085 schema=pa.schema([("col", pa.int64())]))
4086 expected = pa.table({'col': pa.array([None, None, None], pa.int64())})
4087 assert dataset_reader.to_table(dataset).equals(expected)
4088
4089
4090def test_dataset_project_columns(tempdir, dataset_reader):

Callers

nothing calls this directly

Calls 4

equalsMethod · 0.80
arrayMethod · 0.45
schemaMethod · 0.45
to_tableMethod · 0.45

Tested by

no test coverage detected