You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 20:43:04 UTC

[GitHub] [beam] damccorm opened a new issue, #20942: Wrong process function arg order cause unexpected runtime value shift

damccorm opened a new issue, #20942:
URL: https://github.com/apache/beam/issues/20942

   if kw args of process function are declared before DnFnParam placeholders the fulfillment will shift to wrong index unexpectedly.
   
   For example if process has signature
   ```
   
    def process(element, an_arg='x', w=DoFn.WindowParam):
      window_start_1 = an_arg.start // this is
   ok, though unexpectedly
      window_start_2 = w.start // this is not ok, also unexpectedly, value of
   w is shifted onto an_arg, and w is DoFn.WindowParam, it throws exception _DoFnParam has no attribute
   'start'.
      
      ...
   ```
   
   at runtime the window param will be mapped onto 'an_arg' instead of w, and w will not be replaced with runtime value, causing confusing behaviors. (e.g. an_arg will be an instance of GlobalWindow or FixedWindow but w is still DoFn.WindowParam).
   
   Imported from Jira [BEAM-12446](https://issues.apache.org/jira/browse/BEAM-12446). Original Jira may contain additional context.
   Reported by: yichi.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org