MCPcopy Create free account
hub / github.com/apache/datafusion / cast_to

Method cast_to

datafusion/expr-common/src/interval_arithmetic.rs:420–429  ·  view source on GitHub ↗

Casts this interval to `data_type` using `cast_options`.

(
        &self,
        data_type: &DataType,
        cast_options: &CastOptions,
    )

Source from the content-addressed store, hash-verified

418
419 /// Casts this interval to `data_type` using `cast_options`.
420 pub fn cast_to(
421 &self,
422 data_type: &DataType,
423 cast_options: &CastOptions,
424 ) -> Result<Self> {
425 Self::try_new(
426 cast_scalar_value(&self.lower, data_type, cast_options)?,
427 cast_scalar_value(&self.upper, data_type, cast_options)?,
428 )
429 }
430
431 /// An interval containing only the 'false' truth value.
432 pub const FALSE: Self = Self {

Callers 3

contains_valueMethod · 0.45
coerce_for_comparisonFunction · 0.45
coerce_operandsFunction · 0.45

Calls 1

cast_scalar_valueFunction · 0.85

Tested by

no test coverage detected