Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-10781

Allow PTransformOverride to use AppliedPTransform when constructing replacement transform

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Triage Needed
    • Priority: P2
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: sdk-py-core
    • Labels:

      Description

      In the Python SDK, PTransformOverride.get_replacement_transform takes in a PTransform 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.

      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()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                myffical@gmail.com Yifan Mai
                Reporter:
                myffical@gmail.com Yifan Mai
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 14h 50m
                  14h 50m