You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The date, datetime and time is currently not supported as literal value:
>>> from datetime import date
>>> literal(date(2023, 1, 1))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/fokkodriesprong/Desktop/iceberg/python/pyiceberg/expressions/literals.py", line 148, in literal
raise TypeError(f"Invalid literal value: {repr(value)}")
TypeError: Invalid literal value: datetime.date(2023, 1, 1)
We need to accept those as literal:
datetime If there is a timezone, we want to convert it to a timestamptz. We can convert the datetime to an integer using datetime_to_millis in datetime.py.
time We can convert this into an integer using time_to_micros from datetime.py
date We can convert this into an integer using date_to_days from datetime.py
And include tests that hit the newly created branches in the if.
Query engine
None
The text was updated successfully, but these errors were encountered:
Feature Request / Improvement
The
date
,datetime
andtime
is currently not supported as literal value:We need to accept those as literal:
datetime_to_millis
indatetime.py
.time_to_micros
fromdatetime.py
date_to_days
fromdatetime.py
And include tests that hit the newly created branches in the if.
Query engine
None
The text was updated successfully, but these errors were encountered: