Skip to content

Support nested STRUCT and RANGE types in TableSchema conversion #6783

Description

@haphungw

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.

Activity

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

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions