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

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

This issue is assigned but has not received an update in 30 days so it has been 
labeled "stale-assigned". If you are still working on the issue, please give an 
update and remove the label. If you are no longer working on the issue, please 
unassign so someone else may work on it. In 7 days the issue will be 
automatically unassigned.

> 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
>              Labels: stale-assigned
>          Time Spent: 14h 50m
>  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)

Reply via email to