googleapis / googleapis/google-cloud-rust
Support nested `STRUCT` and `RANGE` types in `TableSchema` conversion
- Dominant language
- Rust
- Stars
- 955
- Forks
- 144
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 279
Description
Extend `TableSchema` to `ProtoSchema` conversion to support nested records `STRUCT` and interval ranges `RANGE`. Currently, these return `SchemaError::UnsupportedType`.
1. Recursively traverse nested `TableFieldSchema.fields` and build sub-message `DescriptorProto` definitions.
2. Generate hierarchical scope names (e.g. `root__parent_col__child_col`) matching Go `managedwriter/adapt`.
3. Cache and deduplicate identical child message schemas across different columns.
4. Generate synthetic `start` and `end` fields for `RANGE` corresponding to `range_element_type` (`DATE`, `DATETIME`, `TIMESTAMP`).
5. Narrow / remove `SchemaError::UnsupportedType` once we're done with nested types.
Contributor guide
Assessment
This issue has not been assessed yet.