diff --git a/python/pyarrow/_parquet.pyx b/python/pyarrow/_parquet.pyx index c8723d3fcacaa..a8abf965d3d7b 100644 --- a/python/pyarrow/_parquet.pyx +++ b/python/pyarrow/_parquet.pyx @@ -2189,7 +2189,7 @@ cdef class ParquetWriter(_Weakrefable): with nogil: check_status(self.writer.get() .WriteTable(deref(ctable), c_row_group_size)) - + def add_key_value_metadata(self, key_value_metadata): cdef: shared_ptr[const CKeyValueMetadata] c_metadata diff --git a/python/pyarrow/tests/parquet/test_basic.py b/python/pyarrow/tests/parquet/test_basic.py index 93e0fd1ab93cd..a3e0fd5760226 100644 --- a/python/pyarrow/tests/parquet/test_basic.py +++ b/python/pyarrow/tests/parquet/test_basic.py @@ -932,6 +932,7 @@ def test_deprecated_use_legacy_dataset(tempdir): with pytest.warns(FutureWarning, match=msg): pq.ParquetDataset(path, use_legacy_dataset=False) + def test_append_key_value_metadata(tempdir): table = pa.Table.from_arrays([pa.array([], type='int32')], ['f0']) path = tempdir / 'metadata.parquet'