beam icon indicating copy to clipboard operation
beam copied to clipboard

datetime.date not working with Distinct()

Open damccorm opened this issue 4 years ago • 1 comments

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?

Imported from Jira BEAM-12717. Original Jira may contain additional context. Reported by: sketzig.

damccorm avatar Jun 04 '22 20:06 damccorm

.take-issue

sohailshk avatar Nov 18 '26 17:11 sohailshk