Skip to content
/ beam Public
forked from apache/beam

Commit

Permalink
propogate descriptions for nested Beam Rows during schema translation
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <[email protected]>
  • Loading branch information
Polber committed Nov 8, 2024
1 parent c7e4db7 commit ebef443
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 ebef443

Please sign in to comment.