Skip to content

[C++] field's metadata is not written to Parquet file #31232

Description

@asfimport

I used this code to test the metadata write into file and read back behavior of parquet  file:

https://gist.github.com/dantrim/33f9f14d0b2d3ec45c022aa05f7a45ee

 

The generated file does not have metadata when I read the file in using code below and print it out: 
 

std::shared_ptrarrow::io::ReadableFile infile;
PARQUET_ASSIGN_OR_THROW(infile,
arrow::io::ReadableFile::Open("./test.parquet", arrow::default_memory_pool()));

std::unique_ptrparquet::arrow::FileReader reader;
PARQUET_THROW_NOT_OK(
parquet::arrow::OpenFile(infile, arrow::default_memory_pool(), &reader));
std::shared_ptrarrow::Table table;
PARQUET_THROW_NOT_OK(reader->ReadTable(&table));
EXPECT_EQ(frameCount, table->num_rows());
std::cout<<"==="<schema()->ToString(true) <<std::endl; /// no meta shown
Here is the version info:
libparquet-dev/focal,now 7.0.0-1 amd64 [installed]
libparquet-glib-dev/focal,now 7.0.0-1 amd64 [installed]
libparquet-glib700/focal,now 7.0.0-1 amd64 [installed,automatic]
libparquet700/focal,now 7.0.0-1 amd64 [installed,automatic]

Environment: Ubuntu
Reporter: Sifang Li

Related issues:

Note: This issue was originally created as ARROW-15790. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions