From b08b590f30b90285c3f48e7c041bb1b96b9375b5 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 1 Sep 2022 08:51:42 -0700 Subject: [PATCH] Fix nested optional row inference. This was broken in 2.40 and exposed by cross-langauge work. --- sdks/python/apache_beam/typehints/schemas.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdks/python/apache_beam/typehints/schemas.py b/sdks/python/apache_beam/typehints/schemas.py index 4b312d96ce9f..4e1547d18103 100644 --- a/sdks/python/apache_beam/typehints/schemas.py +++ b/sdks/python/apache_beam/typehints/schemas.py @@ -365,6 +365,8 @@ def typing_from_runner_api( base = self.typing_from_runner_api(base_type) if base == Any: return base + elif isinstance(base, row_type.RowTypeConstraint): + return base else: return Optional[base]