You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Sebastian Kretzig (Jira)" <ji...@apache.org> on 2021/08/03 18:32:00 UTC

[jira] [Created] (BEAM-12717) datetime.date not working with Distinct()

Sebastian Kretzig created BEAM-12717:
----------------------------------------

             Summary: datetime.date not working with Distinct()
                 Key: BEAM-12717
                 URL: https://issues.apache.org/jira/browse/BEAM-12717
             Project: Beam
          Issue Type: Bug
          Components: sdk-py-core
    Affects Versions: 2.31.0
            Reporter: Sebastian Kretzig


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?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)