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


##########
sdks/python/apache_beam/typehints/trivial_inference.py:
##########
@@ -641,6 +654,18 @@ def infer_return_type_func(f, input_types, debug=False, 
depth=0):
       # No-op introduced in 3.11. Without handling this some
       # instructions have functionally > 2 byte size.
       pass
+    elif opname == 'RETURN_CONST':
+      # Introduced in 3.12. Handles returning constants directly
+      # instead of having a LOAD_CONST before a RETURN_VALUE.
+      returns.add(state.const_type(arg))
+      state = None
+    elif opname == 'CALL_INTRINSIC_1':
+      int_op = intrinsic_one_ops.int_one_ops[arg]
+      if debug:
+        print("Executing intrinsic one op", int_op.__name__.upper())
+      int_op(state, arg)
+    elif opname == 'CALL_INTRINSIC_2':

Review Comment:
   I'm inclined to think I can remove the intrinsic 2 call block here for now 
so if there's a failure later we will get the clear "cannot handle operation x" 
failure. I think this was a holdover from when I was anticipating having to 
implement most of the new calls to get tests green. 



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