Abacn commented on code in PR #37855:
URL: https://github.com/apache/beam/pull/37855#discussion_r2940570787
##########
sdks/python/apache_beam/typehints/schemas.py:
##########
@@ -335,19 +335,23 @@ def typing_to_runner_api(self, type_: type) ->
schema_pb2.FieldType:
atomic_type=PRIMITIVE_TO_ATOMIC_TYPE[int])))
elif _safe_issubclass(type_, Sequence) and not _safe_issubclass(type_,
str):
- element_type = self.typing_to_runner_api(_get_args(type_)[0])
- return schema_pb2.FieldType(
- array_type=schema_pb2.ArrayType(element_type=element_type))
+ arg_types = _get_args(type_)
+ if len(arg_types) > 0:
Review Comment:
this (and the following) fixes `#3` IndexOutofBoundError
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]