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

Error inferring type of tuple output

Details

    • Bug
    • Status: Resolved
    • P1
    • Resolution: Fixed
    • None
    • 2.25.0
    • sdk-py-core
    • None

    Description

      with beam.Pipeline() as p:
      
        class Foo(beam.DoFn):
          def process(self, element):
            k, v = element
            yield (k, {k:v})
      
        a = [('a',1), ('a',1), ('b',1)]
      
        input = p | beam.Create(a)
        print(input.element_type)  # ok
      
        pcoll = input | beam.ParDo(Foo())
        print(pcoll.element_type) # claims Tuple[int, Dict[Any, Any]]
      
      # BOOM on run due to coder errors
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              robertwb Robert Bradshaw
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h