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

Method cast_to

datafusion/common/src/stats.rs:312–318  ·  view source on GitHub ↗

Casts the value to the given data type, propagating exactness information.

(&self, data_type: &DataType)

Source from the content-addressed store, hash-verified

310
311 /// Casts the value to the given data type, propagating exactness information.
312 pub fn cast_to(&self, data_type: &DataType) -> Result<Precision<ScalarValue>> {
313 match self {
314 Precision::Exact(value) => value.cast_to(data_type).map(Precision::Exact),
315 Precision::Inexact(value) => value.cast_to(data_type).map(Precision::Inexact),
316 Precision::Absent => Ok(Precision::Absent),
317 }
318 }
319}
320
321impl<T: Debug + Clone + PartialEq + Eq + PartialOrd> Debug for Precision<T> {

Callers 15

type_coercion_demoFunction · 0.45
rewriteMethod · 0.45
project_statisticsMethod · 0.45
evaluateMethod · 0.45
evaluate_predicateFunction · 0.45
evaluateMethod · 0.45
evaluate_boundsMethod · 0.45
with_new_schemaMethod · 0.45
update_to_planMethod · 0.45
insert_to_planMethod · 0.45
stats_cartesian_productFunction · 0.45

Calls 1

mapMethod · 0.45

Tested by 5

join_with_alias_filterFunction · 0.36
test_fn_decodeFunction · 0.36
join_with_alias_filterFunction · 0.36