Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GO][Parquet] Unable to pass metadata without StoreSchema #20399

Closed
asfimport opened this issue Sep 6, 2022 · 2 comments
Closed

[GO][Parquet] Unable to pass metadata without StoreSchema #20399

asfimport opened this issue Sep 6, 2022 · 2 comments

Comments

@asfimport
Copy link

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

 

	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))
	}

 

Reporter: Yan Zhou
Assignee: Matthew Topol / @zeroshade

PRs and other links:

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

@asfimport
Copy link
Author

Matthew Topol / @zeroshade:
Hey [~zhouyan1014] thanks for the proposal. This looks solid to me, would you be interested in making a PR for it? (and adding a test in the PR?)

Otherwise, I'll try to get around to adding this when I have a chance.

@asfimport
Copy link
Author

Matthew Topol / @zeroshade:
Issue resolved by pull request 14087
#14087

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants