Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Remove async_trait dependency: async fn in traits is stable since Rust 1.75

Đang mở
#125 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
50/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

Start by checking the DataFusion TableProvider trait definition and the PrunableStreamingTable implementation in src/lib.rs, then inspect the [dependencies] section of Cargo.toml. Confirm whether the trait uses native async fn; done means removing the attribute and dependency if compatible, then verifying with cargo test.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Problem

Cargo.toml includes async-trait = '0.1' and src/lib.rs uses #[async_trait] on the TableProvider impl for PrunableStreamingTable.

The async_trait proc-macro crate was a workaround before Rust 1.75 (December 2023), which stabilized async fn in traits (RPITIT). The proc-macro generates less efficient code — it heap-allocates a Box<dyn Future> for each async call — whereas native async fn in traits avoids this overhead.

Steps

  1. Check whether the DataFusion TableProvider trait definition already uses native async fn (it should in recent versions).
  2. If so, remove the #[async_trait] attribute from the PrunableStreamingTable impl.
  3. Remove async-trait from Cargo.toml [dependencies].
  4. Verify with cargo test that nothing breaks.

Benefit

Reduces dependency count and eliminates unnecessary heap allocations in the async execution path.

Ngôn ngữ chính
Python
Star
142
Fork
19
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của xqlsystems/xarray-sql

Tất cả issue của xqlsystems/xarray-sql

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.