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

Function cast

datafusion/expr/src/expr_fn.rs:330–332  ·  view source on GitHub ↗

Create a cast expression

(expr: Expr, data_type: DataType)

Source from the content-addressed store, hash-verified

328
329/// Create a cast expression
330pub fn cast(expr: Expr, data_type: DataType) -> Expr {
331 Expr::Cast(Cast::new(Box::new(expr), data_type))
332}
333
334/// Create a try cast expression
335pub fn try_cast(expr: Expr, data_type: DataType) -> Expr {

Callers 15

gen_range_dateMethod · 0.50
cast_to_nsMethod · 0.50
compute_array_to_stringFunction · 0.50
cast_fsl_to_listFunction · 0.50
test_utf8_view_to_sqlFunction · 0.50
map_from_arrays_innerFunction · 0.50
eltFunction · 0.50
spark_rintFunction · 0.50
spark_ceil_arrayFunction · 0.50
build_test_data_frameFunction · 0.50

Calls 2

CastClass · 0.85
newFunction · 0.85

Tested by 15

test_utf8_view_to_sqlFunction · 0.40
test_count_inexact_statFunction · 0.40
test_has_filterFunction · 0.40
get_random_functionFunction · 0.40
cast_expr_testFunction · 0.40
cache_testFunction · 0.40
cache_producer_testFunction · 0.40
write_table_with_orderFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…