[
https://issues.apache.org/jira/browse/ARROW-17627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthew Topol resolved ARROW-17627.
-----------------------------------
Fix Version/s: 10.0.0
Resolution: Fixed
Issue resolved by pull request 14087
[https://github.com/apache/arrow/pull/14087]
> [GO][Parquet] Unable to pass metadata without StoreSchema
> ---------------------------------------------------------
>
> Key: ARROW-17627
> URL: https://issues.apache.org/jira/browse/ARROW-17627
> Project: Apache Arrow
> Issue Type: Bug
> Components: Go, Parquet
> Affects Versions: 9.0.0
> Reporter: Yan Zhou
> Assignee: Matthew Topol
> Priority: Major
> Labels: pull-request-available
> Fix For: 10.0.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> [https://github.com/apache/arrow/blob/master/go/parquet/pqarrow/file_writer.go#L75|https://github.com/apache/arrow/blob/master/go/parquet/pqarrow/file_writer.go#L75,]
>
> Right now the only way to pass in KV metadata is to enable StoreSchema and
> pass it as part of the schema. In otherwise we can't pass through metadata
> without also store ARROW:schema
>
> I suggest change it to the following
>
> {code:go}
> meta := make(metadata.KeyValueMetadata, 0)
> for i := 0; i < arrschema.Metadata().Len(); i++ {
> meta.Append(arrschema.Metadata().Keys()[i],
> arrschema.Metadata().Values()[i])
> }
> if arrprops.storeSchema {
> serializedSchema := flight.SerializeSchema(arrschema,
> props.Allocator())
> meta.Append("ARROW:schema",
> base64.StdEncoding.EncodeToString(serializedSchema))
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)