From 9675dcdb7c78b177bc565bec828c17ea9ec02d20 Mon Sep 17 00:00:00 2001 From: Bruce Ritchie Date: Tue, 5 Mar 2024 19:50:00 -0500 Subject: [PATCH] Fix function arguments for date_bin, date_trunc and date_part. --- datafusion/functions/src/datetime/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/datafusion/functions/src/datetime/mod.rs b/datafusion/functions/src/datetime/mod.rs index 529789acf105..06ba307aa22a 100644 --- a/datafusion/functions/src/datetime/mod.rs +++ b/datafusion/functions/src/datetime/mod.rs @@ -62,18 +62,18 @@ pub mod expr_fn { use datafusion_expr::Expr; #[doc = "coerces an arbitrary timestamp to the start of the nearest specified interval"] - pub fn date_bin(args: Vec) -> Expr { - super::date_bin().call(args) + pub fn date_bin(stride: Expr, source: Expr, origin: Expr) -> Expr { + super::date_bin().call(vec![stride, source, origin]) } #[doc = "extracts a subfield from the date"] - pub fn date_part(args: Vec) -> Expr { - super::date_part().call(args) + pub fn date_part(part: Expr, date: Expr) -> Expr { + super::date_part().call(vec![part, date]) } #[doc = "truncates the date to a specified level of precision"] - pub fn date_trunc(args: Vec) -> Expr { - super::date_trunc().call(args) + pub fn date_trunc(part: Expr, date: Expr) -> Expr { + super::date_trunc().call(vec![part, date]) } /// ```ignore