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.
Enums§
- Cast
Predicate Preimage - Source-domain preimage of
CAST(source_expr AS target_type) OP literal.
Functions§
- cast_
predicate_ preimage - Computes a source-domain preimage for
CAST(source AS target_type) OP literal. - exact_
preimage_ cast - Computes a singleton source-domain literal for exact cast-predicate rewrites.
- is_
date_ narrowing_ cast Deprecated - 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
source_typetotarget_typeloses timestamp precision. - try_
cast_ literal_ to_ type - Convert a literal
ScalarValuetotarget_type, preserving the exact value.