Skip to content

Commit d67cb9b

Browse files
yutannihilationXuanwo
authored andcommitted
fix: Use chrono's quarter() to avoid conflict (#7198)
1 parent d4b9482 commit d67cb9b

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ arrow-select = { version = "54.2.0", path = "./arrow-select" }
9393
arrow-string = { version = "54.2.0", path = "./arrow-string" }
9494
parquet = { version = "54.2.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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -634,12 +634,6 @@ pub(crate) use return_compute_error_with;
634634

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

@@ -648,14 +642,6 @@ trait ChronoDateExt {
648642
}
649643

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

0 commit comments

Comments
 (0)