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

Error inferring type of tuple output

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P1
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.25.0
    • Component/s: sdk-py-core
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:

                  Time Tracking

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