Skip to content

Commit 28d209c

Browse files
authored
Fix PostCommit Python Xlang IO Dataflow job (#35131)
* Add support for iterable type * Fix formatting
1 parent 8c43e8c commit 28d209c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

sdks/python/apache_beam/coders/row_coder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ def _nonnull_coder_from_type(field_type):
161161
return BytesCoder()
162162
elif type_info == "array_type":
163163
return IterableCoder(_coder_from_type(field_type.array_type.element_type))
164+
elif type_info == "iterable_type":
165+
return IterableCoder(
166+
_coder_from_type(field_type.iterable_type.element_type))
164167
elif type_info == "map_type":
165168
return MapCoder(
166169
_coder_from_type(field_type.map_type.key_type),

sdks/python/apache_beam/typehints/schemas.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,10 @@ def typing_from_runner_api(
538538
return LogicalType.from_runner_api(
539539
fieldtype_proto.logical_type).language_type()
540540

541+
elif type_info == "iterable_type":
542+
return Sequence[self.typing_from_runner_api(
543+
fieldtype_proto.iterable_type.element_type)]
544+
541545
else:
542546
raise ValueError(f"Unrecognized type_info: {type_info!r}")
543547

0 commit comments

Comments
 (0)