derrickaw commented on code in PR #41564:
URL: https://github.com/apache/beam/pull/41564#discussion_r4670206777


##########
sdks/python/apache_beam/yaml/yaml_join.py:
##########
@@ -57,20 +57,34 @@ def _validate_type(type, pcolls):
         f'it must be one of the following: "inner", "outer", "left", "right"')
 
 
+def _extract_field_names(pcoll):
+  element_type = getattr(pcoll, 'element_type', None)
+  if element_type is None or element_type is Any:
+    return None
+  try:
+    from apache_beam.typehints.schemas import named_fields_from_element_type
+    return {name for name, _ in named_fields_from_element_type(element_type)}
+  except Exception:
+    pass
+  raw_fields = getattr(element_type, '_fields', None)
+  if raw_fields:
+    if all(isinstance(field, tuple) for field in raw_fields):

Review Comment:
   Hi @vishalmore90, please address this comment. Thanks



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

Reply via email to