Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Nov 7, 2024
1 parent 6d8eb1f commit 4cdcc84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/parquet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ cpdef read_parquet_metadata(list filepaths_or_buffers):
col_names = [info.name() for info in parquet_metadata.schema().root().children()]

index_col_names = set()
json_str = parquet_metadata.metadata()[b'pandas'].decode('utf-8')
json_str = parquet_metadata.metadata()['pandas']
if json_str != "":
meta = json.loads(json_str)
file_is_range_index, index_col, _ = _parse_metadata(meta)
Expand Down
6 changes: 3 additions & 3 deletions python/pylibcudf/pylibcudf/io/parquet_metadata.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ cdef class ParquetColumnSchema:
Returns
-------
list[ParquetColumnSchema]
Children schemas.
Child schemas.
"""
cdef cpp_parquet_metadata.parquet_column_schema child
return [
Expand Down Expand Up @@ -160,14 +160,14 @@ cdef class ParquetMetadata:

cpdef dict metadata(self):
"""
Returns the Key value metadata in the file footer.
Returns the key-value metadata in the file footer.
Returns
-------
dict[bytes, bytes]
Key value metadata as a map.
"""
return self.meta.metadata()
return {key.decode(): val.decode() for key, val in self.meta.metadata()}

cpdef list rowgroup_metadata(self):
"""
Expand Down

0 comments on commit 4cdcc84

Please sign in to comment.