Skip to content

Commit

Permalink
Fix function arguments for date_bin, date_trunc and date_part.
Browse files Browse the repository at this point in the history
  • Loading branch information
Omega359 committed Mar 6, 2024
1 parent 42039da commit 9675dcd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions datafusion/functions/src/datetime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>) -> 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>) -> 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>) -> Expr {
super::date_trunc().call(args)
pub fn date_trunc(part: Expr, date: Expr) -> Expr {
super::date_trunc().call(vec![part, date])
}

/// ```ignore
Expand Down

0 comments on commit 9675dcd

Please sign in to comment.