Expand description
Utilities for casting scalar literals to different data types
This module contains functions for casting ScalarValue literals to different data types, originally extracted from the optimizer’s unwrap_cast module to be shared between logical and physical layers.
Functions§
- is_
date_ narrowing_ cast - Returns true when casting a date column from
from_typetoto_typenarrowsDate64(milliseconds) toDate32(days). - is_
supported_ type - Returns true if unwrap_cast_in_comparison supports this data type
- is_
timestamp_ precision_ narrowing_ cast - Returns true when casting a timestamp from
from_typetoto_typeloses timestamp precision. - try_
cast_ literal_ to_ type - Convert a literal
ScalarValuetotarget_type, preserving the exact value.