Skip to content

Commit 8e40de9

Browse files
yutannihilationemilk
authored andcommitted
fix: Use chrono's quarter() to avoid conflict (#7198)
1 parent b76bc55 commit 8e40de9

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ arrow-select = { version = "53.3.0", path = "./arrow-select" }
9393
arrow-string = { version = "53.3.0", path = "./arrow-string" }
9494
parquet = { version = "53.3.0", path = "./parquet", default-features = false }
9595

96-
chrono = { version = "0.4.34", default-features = false, features = ["clock"] }
96+
chrono = { version = "0.4.40", default-features = false, features = ["clock"] }

arrow-arith/src/temporal.rs

-14
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,6 @@ pub(crate) use return_compute_error_with;
633633

634634
// Internal trait, which is used for mapping values from DateLike structures
635635
trait ChronoDateExt {
636-
/// Returns a value in range `1..=4` indicating the quarter this date falls into
637-
fn quarter(&self) -> u32;
638-
639-
/// Returns a value in range `0..=3` indicating the quarter (zero-based) this date falls into
640-
fn quarter0(&self) -> u32;
641-
642636
/// Returns the day of week; Monday is encoded as `0`, Tuesday as `1`, etc.
643637
fn num_days_from_monday(&self) -> i32;
644638

@@ -647,14 +641,6 @@ trait ChronoDateExt {
647641
}
648642

649643
impl<T: Datelike> ChronoDateExt for T {
650-
fn quarter(&self) -> u32 {
651-
self.quarter0() + 1
652-
}
653-
654-
fn quarter0(&self) -> u32 {
655-
self.month0() / 3
656-
}
657-
658644
fn num_days_from_monday(&self) -> i32 {
659645
self.weekday().num_days_from_monday() as i32
660646
}

0 commit comments

Comments
 (0)