Commit cf8582b
Add builder to help create Schemas for shredding (
- Closes #8922
# Rationale for this change
Basically a helper to simplify this:
```rust
let shredding_type = ShredTypeBuilder::default()
.with_path("a", &DataType::Int64)
.with_path("b.c", &DataType::Utf8)
.with_path("b.d", &DataType::Float64)
.build();
assert_eq!(
shredding_type,
DataType::Struct(Fields::from(vec![
Field::new("a", DataType::Int64, true),
Field::new(
"b",
DataType::Struct(Fields::from(vec![
Field::new("c", DataType::Utf8, true),
Field::new("d", DataType::Float64, true),
])),
true
),
]))
);
```
# What changes are included in this PR?
1. Added `ShredTypeBuilder`
2. Updated existing tests cases to use this new primitive
# Are these changes tested?
Yes
# Are there any user-facing changes?
Add a new public interface
---------
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>ShreddedSchemaBuilder) (#8940)1 parent 4601838 commit cf8582b
File tree
3 files changed
+483
-25
lines changed- parquet-variant-compute/src
- parquet-variant/src
3 files changed
+483
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments