cargo mutants: missed mutants in vortex-functions

Aberta
#12,629 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
68/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
backend, testing

Direção de pesquisa

Start with the four surviving mutants identified in vortex-functions/src/like/mod.rs and vortex-functions/src/pruning/mod.rs, then inspect the linked mutation artifacts to see the affected behavior. Add or adjust tests that fail for each mutant and pass with the original code; the work is done when those mutants are killed by the test suite.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Artifacts:

vortex-functions/src/like/mod.rs:53:5

replace initialize with ()

--- vortex-functions/src/like/mod.rs
+++ replace initialize with ()
@@ -45,20 +45,17 @@
 use vortex_error::VortexResult;
 use vortex_error::vortex_bail;
 use vortex_error::vortex_err;
 use vortex_session::VortexSession;
 use vortex_session::registry::CachedId;
 
 /// Registers [`Like`] and its rule for dictionary-encoded arrays.
 pub(crate) fn initialize(session: &VortexSession) {
-    session.register_scalar_fn(Like);
-    session
-        .kernels()
-        .register_reduce_parent_rule(Like, Dict, const { &LikeReduceAdaptor(Dict) });
+    () /* ~ changed by cargo-mutants ~ */
 }
 
 /// Options for SQL LIKE function
 #[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)]
 pub struct LikeOptions {
     pub negated: bool,
     pub case_insensitive: bool,
 }
cargo mutants -f vortex-functions/src/like/mod.rs -F ':53:5:'
vortex-functions/src/pruning/mod.rs:306:8

delete ! in list_contains_stat_compare_mode

--- vortex-functions/src/pruning/mod.rs
+++ delete ! in list_contains_stat_compare_mode
@@ -298,17 +298,17 @@
 }
 
 /// Stat comparison mode for [`list_contains_falsify`], or `None` if total-order bounds are unsound.
 fn list_contains_stat_compare_mode(mode: CompareMode, needle_dtype: &DType) -> Option<CompareMode> {
     let mode = mode.for_dtype(needle_dtype);
     if mode.is_total_order() {
         return Some(CompareMode::TOTAL_ORDER);
     }
-    if !needle_dtype.is_float() {
+    if  /* ~ changed by cargo-mutants ~ */needle_dtype.is_float() {
         // Total-order bounds on nested/extension float types do not refine coarser float orders.
         return None;
     }
     match mode.float_order() {
         FloatOrder::TotalOrder => Some(CompareMode::TOTAL_ORDER),
         // Non-NaN guards exclude NaNs in `needle`, so `ZerosEqual` matches signed-zero equality
         // while keeping bitwise NaN order for `non_null_bounds`.
         FloatOrder::ZerosEqual | FloatOrder::Canonical | FloatOrder::Ieee754 => {
cargo mutants -f vortex-functions/src/pruning/mod.rs -F ':306:8:'
vortex-functions/src/pruning/mod.rs:311:9

delete match arm FloatOrder::TotalOrder in list_contains_stat_compare_mode

--- vortex-functions/src/pruning/mod.rs
+++ delete match arm FloatOrder::TotalOrder in list_contains_stat_compare_mode
@@ -303,17 +303,17 @@
     if mode.is_total_order() {
         return Some(CompareMode::TOTAL_ORDER);
     }
     if !needle_dtype.is_float() {
         // Total-order bounds on nested/extension float types do not refine coarser float orders.
         return None;
     }
     match mode.float_order() {
-        FloatOrder::TotalOrder => Some(CompareMode::TOTAL_ORDER),
+         /* ~ changed by cargo-mutants ~ */
         // Non-NaN guards exclude NaNs in `needle`, so `ZerosEqual` matches signed-zero equality
         // while keeping bitwise NaN order for `non_null_bounds`.
         FloatOrder::ZerosEqual | FloatOrder::Canonical | FloatOrder::Ieee754 => {
             Some(CompareMode::new(FloatOrder::ZerosEqual))
         }
         _ => None,
     }
 }
cargo mutants -f vortex-functions/src/pruning/mod.rs -F ':311:9:'
vortex-functions/src/pruning/mod.rs:314:9

delete match arm FloatOrder::ZerosEqual | FloatOrder::Canonical | FloatOrder::Ieee754 in list_contains_stat_compare_mode

--- vortex-functions/src/pruning/mod.rs
+++ delete match arm FloatOrder::ZerosEqual | FloatOrder::Canonical | FloatOrder::Ieee754 in list_contains_stat_compare_mode
@@ -306,19 +306,17 @@
     if !needle_dtype.is_float() {
         // Total-order bounds on nested/extension float types do not refine coarser float orders.
         return None;
     }
     match mode.float_order() {
         FloatOrder::TotalOrder => Some(CompareMode::TOTAL_ORDER),
         // Non-NaN guards exclude NaNs in `needle`, so `ZerosEqual` matches signed-zero equality
         // while keeping bitwise NaN order for `non_null_bounds`.
-        FloatOrder::ZerosEqual | FloatOrder::Canonical | FloatOrder::Ieee754 => {
-            Some(CompareMode::new(FloatOrder::ZerosEqual))
-        }
+         /* ~ changed by cargo-mutants ~ */
         _ => None,
     }
 }
 
 fn list_contains_falsify<P: NonNanProof>(
     expr: &BoundExpression,
     session: &VortexSession,
 ) -> VortexResult<Option<BoundExpression>> {
cargo mutants -f vortex-functions/src/pruning/mod.rs -F ':314:9:'
Linguagem predominante
Rust
Estrelas
3.2k
Forks
239
Merge médio
1d 4h
PRs com merge (30d)
684

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de vortex-data/vortex

Todas as issues de vortex-data/vortex

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.