Skip to main content

Module typed_value

Module typed_value 

Source
Expand description

Typed text read as a column’s own type, so a filter or Data Quality partition stays a plain col op lit comparison (comparing as text fails for dates, or casts every row, blinding Parquet statistics and SQLite to the predicate).

Functions§

parse
text as a literal of dtype (number, flag, date, zoned datetime, time, duration, decimal at the column’s scale); text and categories stay text. The error says the expected form. Whole numbers read as i64/u64 (so < 300 works on i8); floats at the column’s precision.
python
A literal as Python Polars: pl.date(2024, 1, 1), pl.datetime(...), pl.duration(...), a number, a string.
text_of
The text parse reads back to exactly value (what +/- filters use): floats as shortest exact decimals, datetimes as their zoned clock to the last digit (with offset when ambiguous). None for null or unsupported types.
written_as
The forms a value of dtype is written in, for a message about one that is not.