jrmccluskey commented on code in PR #25795:
URL: https://github.com/apache/beam/pull/25795#discussion_r1136210202


##########
sdks/python/apache_beam/typehints/trivial_inference.py:
##########
@@ -498,6 +518,39 @@ def infer_return_type_func(f, input_types, debug=False, 
depth=0):
       else:
         return_type = typehints.Any
       state.stack[-pop_count:] = [return_type]
+    elif opname == 'CALL':
+      pop_count = 1 + arg
+      # Keyword Args case
+      if state.kw_names is not None:
+        if isinstance(state.stack[-pop_count], Const):
+          from apache_beam.pvalue import Row
+          if state.stack[-pop_count].value == Row:

Review Comment:
   This is doable but a little finnicky since the `CALL` version and the 
`CALL_FUNCTION_KW` version have slightly different accessed indices in the stack



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