Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Comparisons with date values unsupported #273

Closed
mark-oppenheim opened this issue Dec 30, 2019 · 3 comments · Fixed by #274
Closed

Comparisons with date values unsupported #273

mark-oppenheim opened this issue Dec 30, 2019 · 3 comments · Fixed by #274
Labels

Comments

@mark-oppenheim
Copy link

mark-oppenheim commented Dec 30, 2019

Using 2.4.0.post6

sf.lit(date.today()) < date.today()

mypy reports Unsupported operand types for < ("Column" and "date")

I suspect the solution is as simple as changing the definitions of lt, gt, lte, gte etc in master/third_party/3/pyspark/sql/column.pyi from Union[Column, LiteralType, DecimalLiteral]) to Union[Column, LiteralType, DecimalLiteral, DateTimeLiteral]) DateTimeLiteral is already imported but appears not to be used.

@zero323
Copy link
Owner

zero323 commented Dec 30, 2019

Thank you for reporting @mark-oppenheim.

@zero323
Copy link
Owner

zero323 commented Dec 30, 2019

Resolved by #274

@ghost
Copy link

ghost commented Dec 31, 2019

That's an amazing turn-around time. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants