From 1119269f3ab4b68afa063262b36af63a335343e7 Mon Sep 17 00:00:00 2001 From: Zhenglin-Li <1125806272@qq.com> Date: Fri, 30 Dec 2022 13:38:17 +0800 Subject: [PATCH 1/3] improve error message for mismatched pipelines --- sdks/python/apache_beam/transforms/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/transforms/util.py b/sdks/python/apache_beam/transforms/util.py index 5f99d6805469..65b40c29b1e8 100644 --- a/sdks/python/apache_beam/transforms/util.py +++ b/sdks/python/apache_beam/transforms/util.py @@ -234,7 +234,8 @@ def expand(self, pcolls): for pcoll in pcolls.values(): self._check_pcollection(pcoll) if self.pipeline: - assert pcoll.pipeline == self.pipeline + assert pcoll.pipeline == self.pipeline, ( + 'mismatched pipelines, input PCollections must all belong to the same pipeline') tags = list(pcolls.keys()) From de0b07484ab648c8142e51874e2f26208b5723af Mon Sep 17 00:00:00 2001 From: tvalentyn Date: Thu, 19 Jan 2023 15:41:24 -0800 Subject: [PATCH 2/3] Update sdks/python/apache_beam/transforms/util.py --- sdks/python/apache_beam/transforms/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/transforms/util.py b/sdks/python/apache_beam/transforms/util.py index 65b40c29b1e8..4dcb6296633d 100644 --- a/sdks/python/apache_beam/transforms/util.py +++ b/sdks/python/apache_beam/transforms/util.py @@ -235,7 +235,7 @@ def expand(self, pcolls): self._check_pcollection(pcoll) if self.pipeline: assert pcoll.pipeline == self.pipeline, ( - 'mismatched pipelines, input PCollections must all belong to the same pipeline') + 'All input PCollections must belong to the same pipeline.') tags = list(pcolls.keys()) From fee80ef16afe758ea3946b1bbeeba7dd994f4908 Mon Sep 17 00:00:00 2001 From: tvalentyn Date: Thu, 19 Jan 2023 15:49:34 -0800 Subject: [PATCH 3/3] Update sdks/python/apache_beam/transforms/util.py --- sdks/python/apache_beam/transforms/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/transforms/util.py b/sdks/python/apache_beam/transforms/util.py index 4dcb6296633d..868dbe1361b8 100644 --- a/sdks/python/apache_beam/transforms/util.py +++ b/sdks/python/apache_beam/transforms/util.py @@ -235,7 +235,7 @@ def expand(self, pcolls): self._check_pcollection(pcoll) if self.pipeline: assert pcoll.pipeline == self.pipeline, ( - 'All input PCollections must belong to the same pipeline.') + 'All input PCollections must belong to the same pipeline.') tags = list(pcolls.keys())