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

gcd benchmarks pass number_rows: 0 for 100k-row inputs

Đang mở Phù hợp với người mới
#26,297 1 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

@med9110 đang làm issue này rồi.

Từ ngày 14/10/2026.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
92/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
performance

Hướng nghiên cứu

Bắt đầu từ datafusion/functions/benches/math_expressions/gcd.rs, tại chỗ khởi tạo ScalarFunctionArgs quanh các dòng 56, 77 và 98, nơi number_rows: 0 được đặt. So sánh với dòng 55 của lcm.rs, dòng này truyền n_rows. Hoàn thành khi các benchmark trên mảng truyền n_rows, benchmark scalar-scalar truyền 1, các thông báo expect ghi "gcd should work on valid values", và cargo bench --bench math_expressions (hoặc bộ lọc bench gcd) vẫn chạy được.

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

Mô tả

bug functions good first issue help wanted tech debt
Describe the bug

All three benchmarks in functions/benches/math_expressions/gcd.rs pass number_rows: 0 in ScalarFunctionArgs, including "gcd both array" and "gcd array and scalar", whose array inputs have 100,000 rows. The sibling lcm.rs benchmark passes number_rows: n_rows. A UDF that sizes its output or expands scalars from number_rows will not do the work the benchmark claims to measure.

Every gcd benchmark also uses the copy-pasted message .expect("date_bin should work on valid values").

To Reproduce

Read gcd.rs lines 56, 77 and 98 (number_rows: 0) and compare with lcm.rs line 55 (number_rows: n_rows).

Expected behavior
  • Pass number_rows: n_rows for the benchmarks with array inputs (and 1 for scalar-scalar).
  • Change the expect messages to "gcd should work on valid values".
Additional context

to_char.rs (L144-L341), gcd.rs and lcm.rs repeat the same bench_function + ScalarFunctionArgs boilerplate seven times, which is how this drift happened. A small shared helper that takes the UDF, args, number_rows and return type would prevent it. That part is optional.

This is a small, self-contained change and a good first issue. Line references are pinned to commit 0d79252f61bd.

Ngôn ngữ chính
Rust
Star
9.4k
Fork
2.5k
Merge trung bình
4 ngày 13 giờ
Pull request đã merge (30 ngày)
353

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 apache/datafusion

Tất cả issue của apache/datafusion

Issue tương tự

Thêm issue về Rust

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.