Add a Parquet file with column chunk key-value metadata#49
Merged
mapleFU merged 8 commits intoapache:masterfrom Jul 21, 2024
Merged
Add a Parquet file with column chunk key-value metadata#49mapleFU merged 8 commits intoapache:masterfrom
mapleFU merged 8 commits intoapache:masterfrom
Conversation
This file has a single row group with 0 row and 1 column. The column
chunk has key-value metadata, with a key "foo" mapped to a value "bar".
Created with this code:
```c++
PARQUET_ASSIGN_OR_THROW(
auto sink, arrow::io::FileOutputStream::Open(
"column-chunk-key-value-metadata.parquet"));
parquet::ParquetFileWriter::Open(
sink, std::static_pointer_cast<parquet::schema::GroupNode>(
parquet::schema::GroupNode::Make(
"schema", parquet::Repetition::REQUIRED,
{parquet::schema::PrimitiveNode::Make(
"column1", parquet::Repetition::OPTIONAL,
parquet::Type::INT32)})))
->AppendRowGroup()
->NextColumn()
->key_value_metadata()
.Append("foo", "bar");
```
Member
|
Would you mind adding some description about this new file in the README? |
Member
|
Suggestion: add two metadata entries: one with a value, the other without (the metadata key is mandatory while the value is optional). |
mapleFU
approved these changes
Jul 15, 2024
mapleFU
reviewed
Jul 15, 2024
Co-authored-by: mwish <[email protected]>
Member
|
Merged, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This file has a single row group with 0 row and 2 columns.
The first column chunk has the following key-value metadata:
Created with this code, with a modified Arrow library to output "thisiskeywithoutvalue" without a value for the first column.
This is for apache/arrow#41580