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

Check that DoFn outputs are valid iterables when using the performance runtime type check feature

    XMLWordPrintableJSON

    Details

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

      Description

      Currently, when using the performance runtime type check feature, you can yield invalid iterables from a DoFn and not have an error thrown. This is incorrect behavior.

       

      We should throw a TypeCheckError if the iterable type is any of the following: dict, str, unicode, or bytes. 

       

      Previously, we tried accomplishing this using an isinstance check in process_outputs of common.py, however this harms performance significantly. We should search for a cheaper way to verify that the output type is valid. One possible solution is to only do the isinstance check if the flag is on.

       

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              saavan Saavan Nanavati
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: