Skip to content

Build Error: Conflict on quarter() method from arrow-arith due to chrono upgrade #33

Description

@Zhao-hb

Environment:
OS: Ubuntu 22.04
Rust: tried with versions 1.76, 1.80, and 1.81
Cargo: latest stable
Project: latest main branch of this repository
Build command: cargo build --release (manually cloned, no Docker)

error[E0034]: multiple applicable items in scope
--> /home/zhb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/arrow-arith-49.0.0/src/temporal.rs:238:47
|
238 | time_fraction_dyn(array, "quarter", |t| t.quarter() as i32)
| ^^^^^^^ multiple quarter found
|
= note: candidate #1 is defined in an impl of the trait Datelike for the type NaiveDateTime
note: candidate #2 is defined in an impl of the trait ChronoDateExt for the type T
--> /home/zhb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/arrow-arith-49.0.0/src/temporal.rs:147:5
|
147 | fn quarter(&self) -> u32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method for candidate #1
|
238 - time_fraction_dyn(array, "quarter", |t| t.quarter() as i32)
238 + time_fraction_dyn(array, "quarter", |t| Datelike::quarter(&t) as i32)
|
help: disambiguate the method for candidate #2
|
238 - time_fraction_dyn(array, "quarter", |t| t.quarter() as i32)
238 + time_fraction_dyn(array, "quarter", |t| ChronoDateExt::quarter(&t) as i32)

What I’ve already tried:

Removed Cargo.lock and re-ran the build — issue persists.
Tried pinning arrow and all sub-crates (e.g., arrow-arith, arrow-select, arrow-string) to 54.2.1 using [patch.crates-io] in Cargo.toml.
However, during build, arrow-arith = 49.0.0 still gets pulled, leading to the same quarter() ambiguity.
Ran cargo tree -i arrow-arith and confirmed old dependency is being resolved indirectly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions