Module casts

Module casts 

Source
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Β§

cast_between_timestamp πŸ”’
Cast a timestamp value from one unit to another
is_supported_binary_type πŸ”’
is_supported_dictionary_type πŸ”’
Returns true if unwrap_cast_in_comparison supports casting this value as a dictionary
is_supported_numeric_type πŸ”’
Returns true if unwrap_cast_in_comparison support this numeric type
is_supported_string_type πŸ”’
Returns true if unwrap_cast_in_comparison supports casting this value as a string
is_supported_type
Returns true if unwrap_cast_in_comparison supports this data type
try_cast_binary πŸ”’
try_cast_dictionary πŸ”’
Attempt to cast to/from a dictionary type by wrapping/unwrapping the dictionary
try_cast_literal_to_type
Convert a literal value from one data type to another
try_cast_numeric_literal πŸ”’
Convert a numeric value from one numeric data type to another
try_cast_string_literal πŸ”’