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

datetime.date not working with Distinct()

Details

    • Bug
    • Status: Open
    • P3
    • Resolution: Unresolved
    • 2.31.0
    • None
    • sdk-py-core

    Description

      I was using 2.28.0 and running a standard Distinct on a PColl of datetime.dates without problems.

      After upgrading to 2.31.0, I'm getting this error:

      TypeError: Unable to deterministically encode '2020-12-02' of type '<class 'datetime.date'>', please provide a type hint for the input of 'Get the unique dates from prices/Group/GroupByKey' [while running 'Get the unique dates from prices/ToPairs']

      Had convert the date to str and back to date after running the Distinct() to preserve the date type. Any clues?

      Attachments

        Activity

          People

            Unassigned Unassigned
            sketzig Sebastian Kretzig
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: