pitrou commented on code in PR #41633:
URL: https://github.com/apache/arrow/pull/41633#discussion_r1625921730


##########
python/pyarrow/_parquet.pxd:
##########
@@ -24,7 +24,7 @@ from pyarrow.includes.libarrow cimport (CChunkedArray, 
CScalar, CSchema, CStatus
                                         CKeyValueMetadata, CRandomAccessFile,
                                         COutputStream, CCacheOptions,
                                         TimeUnit, CRecordBatchReader)
-from pyarrow.lib cimport _Weakrefable
+from pyarrow.lib cimport (_Weakrefable, pyarrow_unwrap_metadata, 
KeyValueMetadata)

Review Comment:
   Note that the new imports are only required in `_parquet.pyx` AFAICT.



##########
python/pyarrow/parquet/core.py:
##########
@@ -1108,6 +1108,18 @@ def close(self):
         if self.file_handle is not None:
             self.file_handle.close()
 
+    def add_key_value_metadata(self, key_value_metadata):
+        """
+        Add key-value metadata to the file.
+        This will overwrite any existing metadata with the same key.
+
+        Parameters
+        ----------
+        key_value_metadata : {Key, Value}

Review Comment:
   Let's reuse the same conventions as in other docstrings:
   ```suggestion
           key_value_metadata : dict
               Keys and values must be string-like / coercible to bytes
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to