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

Function invoke_to_date_with_args

datafusion/functions/src/datetime/to_date.rs:203–220  ·  view source on GitHub ↗
(
        args: Vec<ColumnarValue>,
        number_rows: usize,
    )

Source from the content-addressed store, hash-verified

201 use std::sync::Arc;
202
203 fn invoke_to_date_with_args(
204 args: Vec<ColumnarValue>,
205 number_rows: usize,
206 ) -> Result<ColumnarValue, DataFusionError> {
207 let arg_fields = args
208 .iter()
209 .map(|arg| Field::new("a", arg.data_type(), true).into())
210 .collect::<Vec<_>>();
211
212 let args = ScalarFunctionArgs {
213 args,
214 arg_fields,
215 number_rows,
216 return_field: Field::new("f", DataType::Date32, true).into(),
217 config_options: Arc::new(ConfigOptions::default()),
218 };
219 ToDateFunc::new().invoke_with_args(args)
220 }
221
222 #[test]
223 fn test_to_date_without_format() {

Calls 6

newFunction · 0.85
mapMethod · 0.45
iterMethod · 0.45
intoMethod · 0.45
data_typeMethod · 0.45
invoke_with_argsMethod · 0.45

Tested by 6

test_scalarFunction · 0.68
test_arrayFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…