Expand description
Text typed as a value for a column, read as the column’s own type.
A filter and a Data Quality partition compare a column with a value someone
typed. Compared as text it either fails (Polars will not compare a date with a
string) or casts every row to text, which costs a pass over the column and
blinds Parquet statistics and SQLite to the predicate. Read here into a literal
of the column’s type, col op lit stays a plain comparison.
Functions§
- parse
textas a literal ofdtype: a number, a flag, a date, a date and time read as a clock in the column’s zone, a time, a duration or a decimal at the column’s scale. Text and categories stay text. The error says whattextshould look like.- python
- A literal as Python Polars:
pl.date(2024, 1, 1),pl.datetime(...),pl.duration(...), a number, a string. - text_of
- The text
parsereads back to exactlyvalue, a value ofdtype: what+and-put in a filter. A float is its shortest exact decimal, a date and time its clock in the column’s zone to the last digit (with its offset where that clock happens twice).Nonefor a null, and for a typeparsedoes not read. - written_
as - The forms a value of
dtypeis written in, for a message about one that is not.