saavannanavati commented on a change in pull request #12352:
URL: https://github.com/apache/beam/pull/12352#discussion_r471162104



##########
File path: sdks/python/apache_beam/typehints/typecheck.py
##########
@@ -265,3 +268,89 @@ def visit_transform(self, applied_transform):
                 transform.get_type_hints(),
                 applied_transform.full_label),
             applied_transform.full_label)
+
+
+class PerformanceTypeCheckVisitor(pipeline.PipelineVisitor):
+
+  _in_combine = False
+  combine_classes = (
+      core.CombineFn,
+      core.CombinePerKey,
+      core.CombineValuesDoFn,
+      core.CombineValues,
+      core.CombineGlobally)
+
+  def enter_composite_transform(self, applied_transform):
+    if isinstance(applied_transform.transform, self.combine_classes):
+      self._in_combine = True
+
+  def leave_composite_transform(self, applied_transform):
+    if isinstance(applied_transform.transform, self.combine_classes):
+      self._in_combine = False
+
+  def visit_transform(self, applied_transform):
+    transform = applied_transform.transform
+    if isinstance(transform, core.ParDo) and not self._in_combine:
+      # Prefix label with 'ParDo' if necessary

Review comment:
       Okay, I'll remove it. With regards to the JIRA issue filed from our 
[conversation](https://github.com/apache/beam/pull/12352#discussion_r470939725) 
about this, I'll move the TODO to where 'ParDo' is currently being prefixed for 
other error messages 
[here](https://github.com/apache/beam/blob/3e7371eae49b7aba142c8c0e898a62f583b49276/sdks/python/apache_beam/typehints/typecheck.py#L93).
 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to