You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2021/09/11 17:24:01 UTC

[jira] [Commented] (BEAM-12446) Wrong process function arg order cause unexpected runtime value shift

    [ https://issues.apache.org/jira/browse/BEAM-12446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17413563#comment-17413563 ] 

Beam JIRA Bot commented on BEAM-12446:
--------------------------------------

This issue is P2 but has been unassigned without any comment for 60 days so it has been labeled "stale-P2". If this issue is still affecting you, we care! Please comment and remove the label. Otherwise, in 14 days the issue will be moved to P3.

Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed explanation of what these priorities mean.


> Wrong process function arg order cause unexpected runtime value shift
> ---------------------------------------------------------------------
>
>                 Key: BEAM-12446
>                 URL: https://issues.apache.org/jira/browse/BEAM-12446
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Yichi Zhang
>            Priority: P2
>              Labels: stale-P2
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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
> {code:java}
>  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'.
>    
>    ...{code}
> 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).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)