liferoad commented on code in PR #35692:
URL: https://github.com/apache/beam/pull/35692#discussion_r2232902620


##########
sdks/python/apache_beam/transforms/core.py:
##########
@@ -3962,9 +3963,46 @@ def to_runner_api_parameter(self, context):
   def infer_output_type(self, unused_input_type):
     if not self.values:
       return typehints.Any
-    return typehints.Union[[
-        trivial_inference.instance_to_type(v) for v in self.values
-    ]]
+
+    try:
+      if not all(isinstance(v, pvalue.Row) for v in self.values):
+        raise TypeError("All data must be Rows.")

Review Comment:
   this introduces stricter schema validation for beam.Row elements, which 
could be a breaking change. I am wondering whether this is too aggressive. 
Shall we just focus on the null-able fields for now?



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