boyuanzz commented on a change in pull request #13431:
URL: https://github.com/apache/beam/pull/13431#discussion_r533679188



##########
File path: sdks/python/apache_beam/runners/common.py
##########
@@ -218,10 +218,11 @@ def __init__(self, obj_to_invoke, method_name):
       elif core.DoFn.KeyParam == v:
         self.key_arg_name = kw
       elif isinstance(v, core.DoFn.RestrictionParam):
-        self.restriction_provider = v.restriction_provider
+        self.restriction_provider = v.restriction_provider or obj_to_invoke

Review comment:
       It might be less likely to happen but I'm curious what if the sdk author 
provides different `RestrictionProvider` from both ways, which one should be 
dominant. From implementation here, it seems like we will pick the param one.




----------------------------------------------------------------
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:
[email protected]


Reply via email to