cargo mutants: missed mutants in vortex-sparse

Đang mở
#12,634 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
databases, testing

Hướng nghiên cứu

Start with encodings/sparse/src/lib.rs at SparseData::encode, around line 520, and inspect the three surviving mutant reports linked in the issue. Identify or add tests that fail when the null-count threshold comparison or its multiplication changes; run cargo mutants -f encodings/sparse/src/lib.rs -F ':520:42:' and cargo mutants -f encodings/sparse/src/lib.rs -F ':520:49:' to check them. Done when tests kill the reported mutants.

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

Mô tả

The nightly run at fdb9507c04e2939724aa39c298653a8ea3fd3b49 found 3 mutants in vortex-sparse that survive the tests. They are in code that changed during the last day.

Artifacts:

encodings/sparse/src/lib.rs:520:42

replace > with == in SparseData::encode

--- encodings/sparse/src/lib.rs
+++ replace > with == in SparseData::encode
@@ -512,17 +512,17 @@
         let mask = array.validity()?.execute_mask(array.len(), ctx)?;
 
         if mask.all_false() {
             // Array is constant NULL
             return Ok(
                 ConstantArray::new(Scalar::null(array.dtype().clone()), array.len()).into_array(),
             );
         } else if (fill_value.as_ref().is_some_and(Scalar::is_null) && !mask.all_true())
-            || mask.false_count() as f64 > (0.9 * mask.len() as f64)
+            || mask.false_count() as f64 == /* ~ changed by cargo-mutants ~ */ (0.9 * mask.len() as f64)
         {
             // Array uses a null fill and has both nulls and non-null values.
             // The values are stored as they are, so their validity must not stay a lazy filter
             // over the input's bitmap, which may itself be compressed.
             let non_null_values = array
                 .filter(mask.clone())?
                 .execute::<CanonicalValidity>(ctx)?
                 .0
cargo mutants -f encodings/sparse/src/lib.rs -F ':520:42:'
encodings/sparse/src/lib.rs:520:42

replace > with >= in SparseData::encode

--- encodings/sparse/src/lib.rs
+++ replace > with >= in SparseData::encode
@@ -512,17 +512,17 @@
         let mask = array.validity()?.execute_mask(array.len(), ctx)?;
 
         if mask.all_false() {
             // Array is constant NULL
             return Ok(
                 ConstantArray::new(Scalar::null(array.dtype().clone()), array.len()).into_array(),
             );
         } else if (fill_value.as_ref().is_some_and(Scalar::is_null) && !mask.all_true())
-            || mask.false_count() as f64 > (0.9 * mask.len() as f64)
+            || mask.false_count() as f64 >= /* ~ changed by cargo-mutants ~ */ (0.9 * mask.len() as f64)
         {
             // Array uses a null fill and has both nulls and non-null values.
             // The values are stored as they are, so their validity must not stay a lazy filter
             // over the input's bitmap, which may itself be compressed.
             let non_null_values = array
                 .filter(mask.clone())?
                 .execute::<CanonicalValidity>(ctx)?
                 .0
cargo mutants -f encodings/sparse/src/lib.rs -F ':520:42:'
encodings/sparse/src/lib.rs:520:49

replace * with + in SparseData::encode

--- encodings/sparse/src/lib.rs
+++ replace * with + in SparseData::encode
@@ -512,17 +512,17 @@
         let mask = array.validity()?.execute_mask(array.len(), ctx)?;
 
         if mask.all_false() {
             // Array is constant NULL
             return Ok(
                 ConstantArray::new(Scalar::null(array.dtype().clone()), array.len()).into_array(),
             );
         } else if (fill_value.as_ref().is_some_and(Scalar::is_null) && !mask.all_true())
-            || mask.false_count() as f64 > (0.9 * mask.len() as f64)
+            || mask.false_count() as f64 > (0.9 + /* ~ changed by cargo-mutants ~ */ mask.len() as f64)
         {
             // Array uses a null fill and has both nulls and non-null values.
             // The values are stored as they are, so their validity must not stay a lazy filter
             // over the input's bitmap, which may itself be compressed.
             let non_null_values = array
                 .filter(mask.clone())?
                 .execute::<CanonicalValidity>(ctx)?
                 .0
cargo mutants -f encodings/sparse/src/lib.rs -F ':520:49:'
Ngôn ngữ chính
Rust
Star
3.2k
Fork
239
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
684

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 vortex-data/vortex

Tất cả issue của vortex-data/vortex

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.