-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add variant_experimental feature to parquet crate
#8133
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
Conversation
variant feature to parquet cratevariant feature to parquet crate
ed04fb5 to
7ab46a1
Compare
variant feature to parquet cratevariant_experimental feature to parquet crate
variant_experimental feature to parquet cratevariant_experimental feature to parquet crate
7ab46a1 to
0ec7656
Compare
0ec7656 to
be5cf31
Compare
parquet/src/variant.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being able to write this example is the largest rationale in my mind for the feature flag in the parquet crate
parquet/src/variant.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will file a follow on ticket for this problem
| //! let batch = RecordBatch::try_from_iter(vec![("data", array)])?; | ||
| //! | ||
| //! // write the RecordBatch to a Parquet file | ||
| //! let file = std::fs::File::create("variant-json.parquet")?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of neat to see the data written. I looked at the resulting file using datafusion-cli and it looks like like this (note it does not have the parquet logical annotation on it)
> select * from 'parquet/variant-json.parquet';
+-----------------------------------------------------------------------------------------------------------------------------------+
| data |
+-----------------------------------------------------------------------------------------------------------------------------------+
| {metadata: 11020003076167656e616d65, value: 020200010002080c1e15416c696365} |
| {metadata: 010400040b0e1263697479616464726573736167656e616d65, value: 0203010203000e10140201000009214e657720596f726b0c190d426f62} |
| {metadata: 010000, value: 020000} |
| {metadata: 010000, value: 020000} |
+-----------------------------------------------------------------------------------------------------------------------------------+
4 row(s) fetched.
Elapsed 0.003 seconds.|
I would like to know if there are any objections to this approach from other maintainers such as @Dandandan @etseidl @waynexia @tustvold and @mbrobbel Also, other Variant contributors like @carpecodeum @scovich @mprammer @klion26 @friendlymatthew please provide any feedback if you have it |
batch_json_string_to_variant and batch_variant_to_json_string json_to_variant
#8144
|
No objections from me. |
|
Very exciting. Thank you! |
|
Thank you for pushing this forward! |
|
I am hoping we can merge this after I made the RC for the next release (ideally in the next day or two) |
Co-authored-by: Matthijs Brobbel <[email protected]>
|
Thanks @alamb |
Which issue does this PR close?
variantfeature toparquetcrate #8132Rationale for this change
TLDR is we need a way to test and work out how Variant integration with the actual parquet reader/writer will look, so let's do it in the parquet crate.
Please see the essay on #8132 for background
Follow on tasks (I will file tickets for these items if we agree on this as an integration mechanism):
panicwhen writing VariantArray with the ArrowWriter: [Variant] writing a VariantArray to parquet panics #8296VariantArray: [Variant] Integration tests for reading parquet w/ Variants #8084variant_experimentalflag tovariantand remove warnings about being experimental: [Variant] Renamevariant_experimentalflag tovariantand remove warnings about being experimental #8297Follow up tasks that came out of this PR but do not depend on it
StringViewandLargeStringin ´batch_json_string_to_variant` #8145batch_json_string_to_variantandbatch_variant_to_json_stringjson_to_variant #8144What changes are included in this PR?
variant_experimentalfeature to theparquetcrateAre these changes tested?
Yes by new CI
Are there any user-facing changes?
This adds a new feature flag, and new