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

[Rust] Writing optional fields #3455

Closed
ccakes opened this issue Jan 22, 2019 · 5 comments
Closed

[Rust] Writing optional fields #3455

ccakes opened this issue Jan 22, 2019 · 5 comments

Comments

@ccakes
Copy link

ccakes commented Jan 22, 2019

I'm trying to write a dataset with optional fields but I can't figure out a way to do it using the existing API. While the only write methods are per-row group, I can't see a way to specify nulls via ColumnWriterImpl.write_batch()

Am I missing something obvious or is this something that isn't well supported until the Row writer implementation? I tried looking at the other lang libraries for inspiration (specifically C++) but it only gives an example using write_batch as effectively an individual row writer, other languages all give examples for optionals using dedicated row-level writer functionality.

@paddyhoran
Copy link
Contributor

cc @sunchao

@sunchao
Copy link
Member

sunchao commented Jan 24, 2019

@ccakes at the moment we don't have a high-level API for this yet, so you have to provide values, repetition levels, and definition levels. Please check here for how to use the API, and this tutorial for how to specify nulls via definition levels.

I do intend to implement a high-level API in the near future which will make this much easier. There's also a PR that aims at providing a serde_derive like procedure macro to serialize Rust structs into Parquet format.

@wesm
Copy link
Member

wesm commented Jan 27, 2019

Can you open a JIRA for this, or otherwise close it?

@sunchao
Copy link
Member

sunchao commented Jan 27, 2019

I filed ARROW-4392 to track the high-level Parquet writer.

@wesm
Copy link
Member

wesm commented Jan 27, 2019

Sweet thanks

@wesm wesm closed this as completed Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants