Sounek opened a new issue #10164:
URL: https://github.com/apache/arrow/issues/10164


   Hey,
   
   I create a parquet file in the following way:
   
   ```
   arrow::DoubleBuilder f64builder;
   f64builderWcX.AppendValues({1.0, 2.0, 3.0});
   std::shared_ptr<arrow::Array> array;
   f64builderWcX.Finish(&array);
   
   std::vector<std::shared_ptr<arrow::Field>> fields;
   auto field = std::make_shared<arrow::Field>("DataRow1", arrow::float64(), 
true, arrow::key_value_metadata({ "Unit" }, { "mm" }));
   
   auto schema = std::make_shared<arrow::Schema>(fields);
   schema = schema->WithMetadata(arrow::key_value_metadata({ "user" }, { "me" 
}));
   
   auto table = arrow::Table::Make(schema, {array});
   
   std::shared_ptr<arrow::io::FileOutputStream> outfile;
   PARQUET_ASSIGN_OR_THROW(outfile, 
arrow::io::FileOutputStream::Open("D:\\parquet-arrow-example.parquet"));
   
   PARQUET_THROW_NOT_OK( parquet::arrow::WriteTable(table, 
arrow::default_memory_pool(), outfile, 1));
   ```
   
   The parquet is created fine and it contains all data, but it seems that 
custom metadata I add is gone. 
   Am I doing something wrong? Or do I need to explicity export the metadata?
   
   Thanks in advance.
   
   Best regards
   Sven


-- 
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.

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


Reply via email to