Open gab23r opened 2 weeks ago
import polars as pl import datetime some_datetime = datetime.datetime.now() pl.select(pl.lit(some_datetime, dtype=pl.Date)).schema. # <<< Date # OrderedDict([('literal', Datetime(time_unit='us', time_zone=None))]) # <<< Datetime some_date = datetime.date.today() pl.select(pl.lit(some_date, dtype=pl.Datetime)).schema # <<< Datetime # OrderedDict([('literal', Date)]) # <<< Date
No response
dtype is silently ignored in these cases (see above).
dtype
I would except either a cast to the provided dtype or a raise.
This is happening on the python side.
Checks
Reproducible example
Log output
No response
Issue description
dtype
is silently ignored in these cases (see above).Expected behavior
I would except either a cast to the provided
dtype
or a raise.Installed versions