Skip to content
/ beam Public
forked from apache/beam

Commit

Permalink
Merge pull request apache#33046 Nested Beam Row descriptions.
Browse files Browse the repository at this point in the history
Propagate descriptions for nested Beam Rows during schema translation.
  • Loading branch information
robertwb authored Nov 19, 2024
2 parents 12a056d + ebef443 commit 37c3e6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdks/python/apache_beam/typehints/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,17 @@ def typing_from_runner_api(
# generate a NamedTuple type to use.

fields = named_fields_from_schema(schema)
descriptions = {
field.name: field.description
for field in schema.fields
}
result = row_type.RowTypeConstraint.from_fields(
fields=fields,
schema_id=schema.id,
schema_options=schema_options,
field_options=field_options,
schema_registry=self.schema_registry,
)
field_descriptions=descriptions or None)
return result
else:
return row_type.RowTypeConstraint.from_user_type(
Expand Down

0 comments on commit 37c3e6d

Please sign in to comment.