You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/09/02 16:21:00 UTC

[jira] [Work logged] (BEAM-10781) Allow PTransformOverride to use AppliedPTransform when constructing replacement transform

     [ https://issues.apache.org/jira/browse/BEAM-10781?focusedWorklogId=477956&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-477956 ]

ASF GitHub Bot logged work on BEAM-10781:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Sep/20 16:20
            Start Date: 02/Sep/20 16:20
    Worklog Time Spent: 10m 
      Work Description: chamikaramj commented on pull request #12656:
URL: https://github.com/apache/beam/pull/12656#issuecomment-685845145


   Retest this please


----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 477956)
    Time Spent: 4h  (was: 3h 50m)

> Allow PTransformOverride to use AppliedPTransform when constructing replacement transform
> -----------------------------------------------------------------------------------------
>
>                 Key: BEAM-10781
>                 URL: https://issues.apache.org/jira/browse/BEAM-10781
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-py-core
>            Reporter: Yifan Mai
>            Assignee: Yifan Mai
>            Priority: P2
>          Time Spent: 4h
>  Remaining Estimate: 0h
>
> In the Python SDK, {{PTransformOverride.get_replacement_transform}} takes in a [{{PTransform}}|https://github.com/apache/beam/blob/cfa448d121297398312d09c531258a72b413488b/sdks/python/apache_beam/pipeline.py#L1321] rather than an {{AppliedPTransform}}. This is inconvenient because the {{PTransformOverride}} may want to inspect the properties of the {{AppliedPTransform}} when constructing the replacement {{PTransform}}. This is already [allowed in Java|https://github.com/apache/beam/blob/cfa448d121297398312d09c531258a72b413488b/sdks/java/core/src/main/java/org/apache/beam/sdk/runners/PTransformOverrideFactory.java#L49].
> The proposal to do this in a backward compatible way is as follows:
> * Introduce {{PTransformOverride.get_replacement_transform_for_applied_ptransform(self, applied_ptransform}} and call it instead of {{PTransformOverride.get_replacement_transform}}. The user can override this to provide a replacement {{PTransform}} using the input {{AppliedPTransform}}.
> * Provide a default implementation of {{PTransformOverride.get_replacement_transform_for_applied_ptransform()}} that calls {{PTransformOverride.get_replacement_transform()}} for backwards compatibility
> * Deprecate {{PTransformOverride.get_replacement_transform()}}



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