cargo mutants: missed mutants in vortex-btrblocks
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 51/100
Línea de trabajo
Start with vortex-btrblocks/src/schemes/mod.rs and inspect the reported surviving mutants, then review their referenced artifacts from the nightly run. Add or adjust tests that fail when these mutations change behavior; done means the relevant mutants are killed by the tests. The issue does not name test files or commands to run.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The nightly run at fdb9507c04e2939724aa39c298653a8ea3fd3b49 found 34 mutants in vortex-btrblocks that survive the tests. They are in code that changed during the last day.
Artifacts:
- mutants-0
- mutants-2
- mutants-13
- mutants-1
- mutants-3
- mutants-6
- mutants-10
- mutants-5
- mutants-4
- mutants-11
- mutants-9
- mutants-12
- mutants-15
- mutants-14
vortex-btrblocks/src/schemes/mod.rs:142:67
replace + with - in sparse_byte_ratio
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace + with - in sparse_byte_ratio
@@ -134,17 +134,17 @@
let validity_bytes = if has_nulls { len.div_ceil(8) } else { 0 };
let uncompressed_bytes = len * elem_bytes + validity_bytes;
let idx_width = sparse_index_width(len);
let patch_validity = if patch_has_validity {
patch_count.div_ceil(8)
} else {
0
};
- let compressed_bytes = patch_count * (elem_bytes + idx_width) + patch_validity;
+ let compressed_bytes = patch_count * (elem_bytes + idx_width) - /* ~ changed by cargo-mutants ~ */ patch_validity;
if compressed_bytes == 0 || compressed_bytes >= uncompressed_bytes {
return EstimateVerdict::Skip;
}
EstimateVerdict::Ratio(uncompressed_bytes as f64 / compressed_bytes as f64)
}
/// Encodes a null-dominated primitive array as `Sparse` with an explicit null fill, cascading both
/// patch values (child 0) and narrowed patch indices (child 1).
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':142:67:'
vortex-btrblocks/src/schemes/mod.rs:174:28
replace match guard indices.ptype().byte_width() < min_ptype.byte_width() with true in encode_null_dominated_sparse
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace match guard indices.ptype().byte_width() < min_ptype.byte_width() with true in encode_null_dominated_sparse
@@ -166,17 +166,17 @@
let values = sparse.patches().values().clone();
let indices = sparse
.patches()
.indices()
.clone()
.execute::<PrimitiveArray>(exec_ctx)?
.narrow(exec_ctx)?;
let indices = match min_idx_ptype {
- Some(min_ptype) if indices.ptype().byte_width() < min_ptype.byte_width() => indices
+ Some(min_ptype) if true /* ~ changed by cargo-mutants ~ */ => indices
.into_array()
.cast(DType::Primitive(min_ptype, Nullability::NonNullable))?
.execute::<PrimitiveArray>(exec_ctx)?,
_ => indices,
};
let len = sparse.len();
let fill = sparse.fill_scalar().clone();
Ok(Encoded::new(
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':174:28:'
vortex-btrblocks/src/schemes/mod.rs:174:57
replace < with <= in encode_null_dominated_sparse
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace < with <= in encode_null_dominated_sparse
@@ -166,17 +166,17 @@
let values = sparse.patches().values().clone();
let indices = sparse
.patches()
.indices()
.clone()
.execute::<PrimitiveArray>(exec_ctx)?
.narrow(exec_ctx)?;
let indices = match min_idx_ptype {
- Some(min_ptype) if indices.ptype().byte_width() < min_ptype.byte_width() => indices
+ Some(min_ptype) if indices.ptype().byte_width() <= /* ~ changed by cargo-mutants ~ */ min_ptype.byte_width() => indices
.into_array()
.cast(DType::Primitive(min_ptype, Nullability::NonNullable))?
.execute::<PrimitiveArray>(exec_ctx)?,
_ => indices,
};
let len = sparse.len();
let fill = sparse.fill_scalar().clone();
Ok(Encoded::new(
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':174:57:'
vortex-btrblocks/src/schemes/mod.rs:213:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::scheme_name -> &'static str with ""
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::scheme_name -> &'static str with ""
@@ -205,17 +205,17 @@
#[derive(Debug)]
struct NullDominatedSparseSampleScheme {
scheme: &'static dyn Scheme,
full_idx_ptype: PType,
}
impl Scheme for NullDominatedSparseSampleScheme {
fn scheme_name(&self) -> &'static str {
- self.scheme.scheme_name()
+ "" /* ~ changed by cargo-mutants ~ */
}
fn matches(&self, canonical: &Canonical) -> bool {
self.scheme.matches(canonical)
}
fn produced_encodings(&self) -> Vec<ArrayId> {
self.scheme.produced_encodings()
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':213:9:'
vortex-btrblocks/src/schemes/mod.rs:213:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::scheme_name -> &'static str with "xyzzy"
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::scheme_name -> &'static str with "xyzzy"
@@ -205,17 +205,17 @@
#[derive(Debug)]
struct NullDominatedSparseSampleScheme {
scheme: &'static dyn Scheme,
full_idx_ptype: PType,
}
impl Scheme for NullDominatedSparseSampleScheme {
fn scheme_name(&self) -> &'static str {
- self.scheme.scheme_name()
+ "xyzzy" /* ~ changed by cargo-mutants ~ */
}
fn matches(&self, canonical: &Canonical) -> bool {
self.scheme.matches(canonical)
}
fn produced_encodings(&self) -> Vec<ArrayId> {
self.scheme.produced_encodings()
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':213:9:'
vortex-btrblocks/src/schemes/mod.rs:217:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::matches -> bool with true
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::matches -> bool with true
@@ -209,17 +209,17 @@
}
impl Scheme for NullDominatedSparseSampleScheme {
fn scheme_name(&self) -> &'static str {
self.scheme.scheme_name()
}
fn matches(&self, canonical: &Canonical) -> bool {
- self.scheme.matches(canonical)
+ true /* ~ changed by cargo-mutants ~ */
}
fn produced_encodings(&self) -> Vec<ArrayId> {
self.scheme.produced_encodings()
}
fn num_children(&self) -> usize {
self.scheme.num_children()
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':217:9:'
vortex-btrblocks/src/schemes/mod.rs:217:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::matches -> bool with false
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::matches -> bool with false
@@ -209,17 +209,17 @@
}
impl Scheme for NullDominatedSparseSampleScheme {
fn scheme_name(&self) -> &'static str {
self.scheme.scheme_name()
}
fn matches(&self, canonical: &Canonical) -> bool {
- self.scheme.matches(canonical)
+ false /* ~ changed by cargo-mutants ~ */
}
fn produced_encodings(&self) -> Vec<ArrayId> {
self.scheme.produced_encodings()
}
fn num_children(&self) -> usize {
self.scheme.num_children()
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':217:9:'
vortex-btrblocks/src/schemes/mod.rs:225:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::num_children -> usize with 0
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::num_children -> usize with 0
@@ -217,17 +217,17 @@
self.scheme.matches(canonical)
}
fn produced_encodings(&self) -> Vec<ArrayId> {
self.scheme.produced_encodings()
}
fn num_children(&self) -> usize {
- self.scheme.num_children()
+ 0 /* ~ changed by cargo-mutants ~ */
}
fn descendant_exclusions(&self) -> Vec<DescendantExclusion> {
self.scheme.descendant_exclusions()
}
fn ancestor_exclusions(&self) -> Vec<AncestorExclusion> {
self.scheme.ancestor_exclusions()
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':225:9:'
vortex-btrblocks/src/schemes/mod.rs:225:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::num_children -> usize with 1
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::num_children -> usize with 1
@@ -217,17 +217,17 @@
self.scheme.matches(canonical)
}
fn produced_encodings(&self) -> Vec<ArrayId> {
self.scheme.produced_encodings()
}
fn num_children(&self) -> usize {
- self.scheme.num_children()
+ 1 /* ~ changed by cargo-mutants ~ */
}
fn descendant_exclusions(&self) -> Vec<DescendantExclusion> {
self.scheme.descendant_exclusions()
}
fn ancestor_exclusions(&self) -> Vec<AncestorExclusion> {
self.scheme.ancestor_exclusions()
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':225:9:'
vortex-btrblocks/src/schemes/mod.rs:229:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::descendant_exclusions -> Vec<DescendantExclusion> with vec![]
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::descendant_exclusions -> Vec<DescendantExclusion> with vec![]
@@ -221,17 +221,17 @@
self.scheme.produced_encodings()
}
fn num_children(&self) -> usize {
self.scheme.num_children()
}
fn descendant_exclusions(&self) -> Vec<DescendantExclusion> {
- self.scheme.descendant_exclusions()
+ vec![] /* ~ changed by cargo-mutants ~ */
}
fn ancestor_exclusions(&self) -> Vec<AncestorExclusion> {
self.scheme.ancestor_exclusions()
}
#[expect(clippy::unimplemented, reason = "only used via estimate_with_sample")]
fn expected_compression_ratio(
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':229:9:'
vortex-btrblocks/src/schemes/mod.rs:233:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::ancestor_exclusions -> Vec<AncestorExclusion> with vec![]
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::ancestor_exclusions -> Vec<AncestorExclusion> with vec![]
@@ -225,17 +225,17 @@
self.scheme.num_children()
}
fn descendant_exclusions(&self) -> Vec<DescendantExclusion> {
self.scheme.descendant_exclusions()
}
fn ancestor_exclusions(&self) -> Vec<AncestorExclusion> {
- self.scheme.ancestor_exclusions()
+ vec![] /* ~ changed by cargo-mutants ~ */
}
#[expect(clippy::unimplemented, reason = "only used via estimate_with_sample")]
fn expected_compression_ratio(
&self,
_data: &ArrayAndStats,
_compress_ctx: CompressorContext,
_exec_ctx: &mut ExecutionCtx,
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':233:9:'
vortex-btrblocks/src/schemes/float/sparse.rs:49:9
replace <impl Scheme for NullDominatedSparseScheme>::num_children -> usize with 0
--- vortex-btrblocks/src/schemes/float/sparse.rs
+++ replace <impl Scheme for NullDominatedSparseScheme>::num_children -> usize with 0
@@ -41,17 +41,17 @@
}
fn produced_encodings(&self) -> Vec<ArrayId> {
vec![Sparse.id()]
}
/// Children: values=0, indices=1.
fn num_children(&self) -> usize {
- 2
+ 0 /* ~ changed by cargo-mutants ~ */
}
/// Patch values (child 0) are already non-null, so null-dominated Sparse is pointless on them.
/// Sparse indices (child 1) are strictly increasing unique positions, so Dict, RunEnd, RLE,
/// and Sparse are all pointless on them.
fn descendant_exclusions(&self) -> Vec<DescendantExclusion> {
vec![
DescendantExclusion {
cargo mutants -f vortex-btrblocks/src/schemes/float/sparse.rs -F ':49:9:'
vortex-btrblocks/src/schemes/float/sparse.rs:49:9
replace <impl Scheme for NullDominatedSparseScheme>::num_children -> usize with 1
--- vortex-btrblocks/src/schemes/float/sparse.rs
+++ replace <impl Scheme for NullDominatedSparseScheme>::num_children -> usize with 1
@@ -41,17 +41,17 @@
}
fn produced_encodings(&self) -> Vec<ArrayId> {
vec![Sparse.id()]
}
/// Children: values=0, indices=1.
fn num_children(&self) -> usize {
- 2
+ 1 /* ~ changed by cargo-mutants ~ */
}
/// Patch values (child 0) are already non-null, so null-dominated Sparse is pointless on them.
/// Sparse indices (child 1) are strictly increasing unique positions, so Dict, RunEnd, RLE,
/// and Sparse are all pointless on them.
fn descendant_exclusions(&self) -> Vec<DescendantExclusion> {
vec![
DescendantExclusion {
cargo mutants -f vortex-btrblocks/src/schemes/float/sparse.rs -F ':49:9:'
vortex-btrblocks/src/schemes/mod.rs:221:9
replace <impl Scheme for NullDominatedSparseSampleScheme>::produced_encodings -> Vec<ArrayId> with vec![]
--- vortex-btrblocks/src/schemes/mod.rs
+++ replace <impl Scheme for NullDominatedSparseSampleScheme>::produced_encodings -> Vec<ArrayId> with vec![]
@@ -213,17 +213,17 @@
self.scheme.scheme_name()
}
fn matches(&self, canonical: &Canonical) -> bool {
self.scheme.matches(canonical)
}
fn produced_encodings(&self) -> Vec<ArrayId> {
- self.scheme.produced_encodings()
+ vec![] /* ~ changed by cargo-mutants ~ */
}
fn num_children(&self) -> usize {
self.scheme.num_children()
}
fn descendant_exclusions(&self) -> Vec<DescendantExclusion> {
self.scheme.descendant_exclusions()
cargo mutants -f vortex-btrblocks/src/schemes/mod.rs -F ':221:9:'
vortex-btrblocks/src/schemes/float/sparse.rs:56:9
replace <impl Scheme for NullDominatedSparseScheme>::descendant_exclusions -> Vec<DescendantExclusion> with vec![]
--- vortex-btrblocks/src/schemes/float/sparse.rs
+++ replace <impl Scheme for NullDominatedSparseScheme>::descendant_exclusions -> Vec<DescendantExclusion> with vec![]
@@ -48,38 +48,17 @@
fn num_children(&self) -> usize {
2
}
/// Patch values (child 0) are already non-null, so null-dominated Sparse is pointless on them.
/// Sparse indices (child 1) are strictly increasing unique positions, so Dict, RunEnd, RLE,
/// and Sparse are all pointless on them.
fn descendant_exclusions(&self) -> Vec<DescendantExclusion> {
- vec![
- DescendantExclusion {
- excluded: NullDominatedSparseScheme.id(),
- children: ChildSelection::One(0),
- },
- DescendantExclusion {
- excluded: IntDictScheme.id(),
- children: ChildSelection::One(1),
- },
- DescendantExclusion {
- excluded: RunEndScheme.id(),
- children: ChildSelection::One(1),
- },
- DescendantExclusion {
- excluded: IntRLEScheme.id(),
- children: ChildSelection::One(1),
- },
- DescendantExclusion {
- excluded: IntSparseScheme.id(),
- children: ChildSelection::One(1),
- },
- ]
+ vec![] /* ~ changed by cargo-mutants ~ */
}
fn expected_compression_ratio(
&self,
data: &ArrayAndStats,
_compress_ctx: CompressorContext,
exec_ctx: &mut ExecutionCtx,
) -> CompressionEstimate {
cargo mutants -f vortex-btrblocks/src/schemes/float/sparse.rs -F ':56:9:'
vortex-btrblocks/src/schemes/float/sparse.rs:97:38
replace / with % in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/float/sparse.rs
+++ replace / with % in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -89,17 +89,17 @@
// All-null arrays should be compressed as constant instead anyways.
if value_count == 0 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
// Only null-dominated arrays (> 90% null) go this route. Sample so Sparse competes on the
// same sample as Pco and reflects child compression of patch values and indices.
- if stats.null_count() as f64 / len as f64 <= 0.9 {
+ if stats.null_count() as f64 % /* ~ changed by cargo-mutants ~ */ len as f64 <= 0.9 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
let elem_bytes = data.array_as_primitive().ptype().byte_width();
crate::schemes::null_dominated_sparse_estimate(
&NullDominatedSparseScheme,
len,
elem_bytes,
cargo mutants -f vortex-btrblocks/src/schemes/float/sparse.rs -F ':97:38:'
vortex-btrblocks/src/schemes/float/sparse.rs:97:38
replace / with * in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/float/sparse.rs
+++ replace / with * in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -89,17 +89,17 @@
// All-null arrays should be compressed as constant instead anyways.
if value_count == 0 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
// Only null-dominated arrays (> 90% null) go this route. Sample so Sparse competes on the
// same sample as Pco and reflects child compression of patch values and indices.
- if stats.null_count() as f64 / len as f64 <= 0.9 {
+ if stats.null_count() as f64 * /* ~ changed by cargo-mutants ~ */ len as f64 <= 0.9 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
let elem_bytes = data.array_as_primitive().ptype().byte_width();
crate::schemes::null_dominated_sparse_estimate(
&NullDominatedSparseScheme,
len,
elem_bytes,
cargo mutants -f vortex-btrblocks/src/schemes/float/sparse.rs -F ':97:38:'
vortex-btrblocks/src/schemes/integer/sparse.rs:106:51
replace > with >= in <impl Scheme for SparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace > with >= in <impl Scheme for SparseScheme>::expected_compression_ratio
@@ -98,17 +98,17 @@
if value_count == 0 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
let elem_bytes = data.array_as_primitive().ptype().byte_width();
// If more than 90% of values are null, sample so Sparse competes on the same sample as
// Pco and reflects child compression of patch values and indices.
- if stats.null_count() as f64 / len as f64 > 0.9 {
+ if stats.null_count() as f64 / len as f64 >= /* ~ changed by cargo-mutants ~ */ 0.9 {
return crate::schemes::null_dominated_sparse_estimate(
&SparseScheme,
len,
elem_bytes,
value_count as usize,
);
}
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':106:51:'
vortex-btrblocks/src/schemes/integer/sparse.rs:106:38
replace / with % in <impl Scheme for SparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace / with % in <impl Scheme for SparseScheme>::expected_compression_ratio
@@ -98,17 +98,17 @@
if value_count == 0 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
let elem_bytes = data.array_as_primitive().ptype().byte_width();
// If more than 90% of values are null, sample so Sparse competes on the same sample as
// Pco and reflects child compression of patch values and indices.
- if stats.null_count() as f64 / len as f64 > 0.9 {
+ if stats.null_count() as f64 % /* ~ changed by cargo-mutants ~ */ len as f64 > 0.9 {
return crate::schemes::null_dominated_sparse_estimate(
&SparseScheme,
len,
elem_bytes,
value_count as usize,
);
}
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':106:38:'
vortex-btrblocks/src/schemes/integer/sparse.rs:106:38
replace / with * in <impl Scheme for SparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace / with * in <impl Scheme for SparseScheme>::expected_compression_ratio
@@ -98,17 +98,17 @@
if value_count == 0 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
let elem_bytes = data.array_as_primitive().ptype().byte_width();
// If more than 90% of values are null, sample so Sparse competes on the same sample as
// Pco and reflects child compression of patch values and indices.
- if stats.null_count() as f64 / len as f64 > 0.9 {
+ if stats.null_count() as f64 * /* ~ changed by cargo-mutants ~ */ len as f64 > 0.9 {
return crate::schemes::null_dominated_sparse_estimate(
&SparseScheme,
len,
elem_bytes,
value_count as usize,
);
}
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':106:38:'
vortex-btrblocks/src/schemes/integer/sparse.rs:137:44
replace > with == in <impl Scheme for SparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace > with == in <impl Scheme for SparseScheme>::expected_compression_ratio
@@ -129,17 +129,17 @@
let freq = most_frequent_count as f64 / value_count as f64;
if freq < 0.9 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
// When nulls outnumber the most frequent non-null value, `encode` uses a null fill and
// stores only the valid values as patches (with no patch validity bitmap); otherwise it
// uses the top non-null value as fill and stores every non-fill value and null as a patch.
- let has_nulls = stats.null_count() > 0;
+ let has_nulls = stats.null_count() == /* ~ changed by cargo-mutants ~ */ 0;
let (patch_count, patch_has_validity) = if stats.null_count() > most_frequent_count {
(value_count as usize, false)
} else {
(len - most_frequent_count as usize, has_nulls)
};
CompressionEstimate::Verdict(crate::schemes::sparse_byte_ratio(
len,
elem_bytes,
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':137:44:'
vortex-btrblocks/src/schemes/integer/sparse.rs:137:44
replace > with < in <impl Scheme for SparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace > with < in <impl Scheme for SparseScheme>::expected_compression_ratio
@@ -129,17 +129,17 @@
let freq = most_frequent_count as f64 / value_count as f64;
if freq < 0.9 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
// When nulls outnumber the most frequent non-null value, `encode` uses a null fill and
// stores only the valid values as patches (with no patch validity bitmap); otherwise it
// uses the top non-null value as fill and stores every non-fill value and null as a patch.
- let has_nulls = stats.null_count() > 0;
+ let has_nulls = stats.null_count() < /* ~ changed by cargo-mutants ~ */ 0;
let (patch_count, patch_has_validity) = if stats.null_count() > most_frequent_count {
(value_count as usize, false)
} else {
(len - most_frequent_count as usize, has_nulls)
};
CompressionEstimate::Verdict(crate::schemes::sparse_byte_ratio(
len,
elem_bytes,
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':137:44:'
vortex-btrblocks/src/schemes/integer/sparse.rs:137:44
replace > with >= in <impl Scheme for SparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace > with >= in <impl Scheme for SparseScheme>::expected_compression_ratio
@@ -129,17 +129,17 @@
let freq = most_frequent_count as f64 / value_count as f64;
if freq < 0.9 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
// When nulls outnumber the most frequent non-null value, `encode` uses a null fill and
// stores only the valid values as patches (with no patch validity bitmap); otherwise it
// uses the top non-null value as fill and stores every non-fill value and null as a patch.
- let has_nulls = stats.null_count() > 0;
+ let has_nulls = stats.null_count() >= /* ~ changed by cargo-mutants ~ */ 0;
let (patch_count, patch_has_validity) = if stats.null_count() > most_frequent_count {
(value_count as usize, false)
} else {
(len - most_frequent_count as usize, has_nulls)
};
CompressionEstimate::Verdict(crate::schemes::sparse_byte_ratio(
len,
elem_bytes,
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':137:44:'
vortex-btrblocks/src/schemes/integer/sparse.rs:138:71
replace > with == in <impl Scheme for SparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace > with == in <impl Scheme for SparseScheme>::expected_compression_ratio
@@ -130,17 +130,17 @@
if freq < 0.9 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
// When nulls outnumber the most frequent non-null value, `encode` uses a null fill and
// stores only the valid values as patches (with no patch validity bitmap); otherwise it
// uses the top non-null value as fill and stores every non-fill value and null as a patch.
let has_nulls = stats.null_count() > 0;
- let (patch_count, patch_has_validity) = if stats.null_count() > most_frequent_count {
+ let (patch_count, patch_has_validity) = if stats.null_count() == /* ~ changed by cargo-mutants ~ */ most_frequent_count {
(value_count as usize, false)
} else {
(len - most_frequent_count as usize, has_nulls)
};
CompressionEstimate::Verdict(crate::schemes::sparse_byte_ratio(
len,
elem_bytes,
has_nulls,
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':138:71:'
vortex-btrblocks/src/schemes/integer/sparse.rs:138:71
replace > with >= in <impl Scheme for SparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace > with >= in <impl Scheme for SparseScheme>::expected_compression_ratio
@@ -130,17 +130,17 @@
if freq < 0.9 {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
}
// When nulls outnumber the most frequent non-null value, `encode` uses a null fill and
// stores only the valid values as patches (with no patch validity bitmap); otherwise it
// uses the top non-null value as fill and stores every non-fill value and null as a patch.
let has_nulls = stats.null_count() > 0;
- let (patch_count, patch_has_validity) = if stats.null_count() > most_frequent_count {
+ let (patch_count, patch_has_validity) = if stats.null_count() >= /* ~ changed by cargo-mutants ~ */ most_frequent_count {
(value_count as usize, false)
} else {
(len - most_frequent_count as usize, has_nulls)
};
CompressionEstimate::Verdict(crate::schemes::sparse_byte_ratio(
len,
elem_bytes,
has_nulls,
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':138:71:'
vortex-btrblocks/src/schemes/integer/sparse.rs:169:42
replace > with >= in <impl Scheme for SparseScheme>::encode
--- vortex-btrblocks/src/schemes/integer/sparse.rs
+++ replace > with >= in <impl Scheme for SparseScheme>::encode
@@ -161,17 +161,17 @@
let array = data.array();
let (most_frequent_value, most_frequent_count) = stats
.erased()
.most_frequent_value_and_count()
.vortex_expect(
"this must be present since `SparseScheme` declared that we need distinct values",
);
- let fill = if stats.null_count() > most_frequent_count {
+ let fill = if stats.null_count() >= /* ~ changed by cargo-mutants ~ */ most_frequent_count {
Scalar::null(array.dtype().clone())
} else {
Scalar::primitive_value(
most_frequent_value,
most_frequent_value.ptype(),
array.dtype().nullability(),
)
};
cargo mutants -f vortex-btrblocks/src/schemes/integer/sparse.rs -F ':169:42:'
vortex-btrblocks/src/schemes/string/sparse.rs:109:35
replace * with + in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/string/sparse.rs
+++ replace * with + in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -101,17 +101,17 @@
}
// Sparse drops the views of null rows and adds an index per value.
let Ok(before) = uncompressed_size_in_bytes(data.array(), exec_ctx) else {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
};
let null_views = (len - value_count) * size_of::<BinaryView>();
let values = before.saturating_sub(null_views);
- let indices = value_count * crate::schemes::sparse_index_width(len);
+ let indices = value_count + /* ~ changed by cargo-mutants ~ */ crate::schemes::sparse_index_width(len);
// Without a cascade the values keep all their bytes, so long values bound the ratio well
// below the fraction of rows that are null.
if compress_ctx.finished_cascading() {
return CompressionEstimate::Verdict(EstimateVerdict::Ratio(
before as f64 / (values + indices) as f64,
));
}
cargo mutants -f vortex-btrblocks/src/schemes/string/sparse.rs -F ':109:35:'
vortex-btrblocks/src/schemes/string/sparse.rs:109:35
replace * with / in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/string/sparse.rs
+++ replace * with / in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -101,17 +101,17 @@
}
// Sparse drops the views of null rows and adds an index per value.
let Ok(before) = uncompressed_size_in_bytes(data.array(), exec_ctx) else {
return CompressionEstimate::Verdict(EstimateVerdict::Skip);
};
let null_views = (len - value_count) * size_of::<BinaryView>();
let values = before.saturating_sub(null_views);
- let indices = value_count * crate::schemes::sparse_index_width(len);
+ let indices = value_count / /* ~ changed by cargo-mutants ~ */ crate::schemes::sparse_index_width(len);
// Without a cascade the values keep all their bytes, so long values bound the ratio well
// below the fraction of rows that are null.
if compress_ctx.finished_cascading() {
return CompressionEstimate::Verdict(EstimateVerdict::Ratio(
before as f64 / (values + indices) as f64,
));
}
cargo mutants -f vortex-btrblocks/src/schemes/string/sparse.rs -F ':109:35:'
vortex-btrblocks/src/schemes/string/sparse.rs:134:49
replace < with <= in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/string/sparse.rs
+++ replace < with <= in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -126,17 +126,17 @@
if threshold.is_some_and(|threshold| max_ratio <= threshold) {
return Ok(EstimateVerdict::Skip);
}
let sample = sample_values(data.array(), exec_ctx)?;
let sample_before = uncompressed_size_in_bytes(&sample, exec_ctx)?;
// Mark subsampled values as a sample so constant detection cannot falsely collapse
// a uniform subsample and sample-aware string trainers use their sample settings.
- let child_ctx = if sample.len() < value_count {
+ let child_ctx = if sample.len() <= /* ~ changed by cargo-mutants ~ */ value_count {
compress_ctx.with_sampling()
} else {
compress_ctx
};
let compressed_sample = compressor.compress_child(
&sample,
&child_ctx,
NullDominatedSparseScheme.id(),
cargo mutants -f vortex-btrblocks/src/schemes/string/sparse.rs -F ':134:49:'
vortex-btrblocks/src/schemes/string/sparse.rs:157:45
replace - with + in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/string/sparse.rs
+++ replace - with + in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -149,17 +149,17 @@
}
// Fixed tables (such as an FSST symbol table or OnPair dictionary) are paid once
// across all valid values rather than scaling with the subsample ratio.
let fixed = FSSTScheme
.fixed_nbytes(&compressed_sample)
.max(OnPairScheme::default().fixed_nbytes(&compressed_sample))
.min(sample_after);
- let variable = sample_after - fixed;
+ let variable = sample_after + /* ~ changed by cargo-mutants ~ */ fixed;
let compressed_values =
fixed as f64 + values as f64 * variable as f64 / sample_before as f64;
Ok(EstimateVerdict::Ratio(
before as f64 / (compressed_values + indices as f64),
))
},
)))
}
cargo mutants -f vortex-btrblocks/src/schemes/string/sparse.rs -F ':157:45:'
vortex-btrblocks/src/schemes/string/sparse.rs:159:34
replace + with * in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/string/sparse.rs
+++ replace + with * in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -151,17 +151,17 @@
// Fixed tables (such as an FSST symbol table or OnPair dictionary) are paid once
// across all valid values rather than scaling with the subsample ratio.
let fixed = FSSTScheme
.fixed_nbytes(&compressed_sample)
.max(OnPairScheme::default().fixed_nbytes(&compressed_sample))
.min(sample_after);
let variable = sample_after - fixed;
let compressed_values =
- fixed as f64 + values as f64 * variable as f64 / sample_before as f64;
+ fixed as f64 * /* ~ changed by cargo-mutants ~ */ values as f64 * variable as f64 / sample_before as f64;
Ok(EstimateVerdict::Ratio(
before as f64 / (compressed_values + indices as f64),
))
},
)))
}
/// Children: values=0, indices=1. The values are the valid strings alone, so the other string
cargo mutants -f vortex-btrblocks/src/schemes/string/sparse.rs -F ':159:34:'
vortex-btrblocks/src/schemes/string/sparse.rs:159:68
replace / with % in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/string/sparse.rs
+++ replace / with % in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -151,17 +151,17 @@
// Fixed tables (such as an FSST symbol table or OnPair dictionary) are paid once
// across all valid values rather than scaling with the subsample ratio.
let fixed = FSSTScheme
.fixed_nbytes(&compressed_sample)
.max(OnPairScheme::default().fixed_nbytes(&compressed_sample))
.min(sample_after);
let variable = sample_after - fixed;
let compressed_values =
- fixed as f64 + values as f64 * variable as f64 / sample_before as f64;
+ fixed as f64 + values as f64 * variable as f64 % /* ~ changed by cargo-mutants ~ */ sample_before as f64;
Ok(EstimateVerdict::Ratio(
before as f64 / (compressed_values + indices as f64),
))
},
)))
}
/// Children: values=0, indices=1. The values are the valid strings alone, so the other string
cargo mutants -f vortex-btrblocks/src/schemes/string/sparse.rs -F ':159:68:'
vortex-btrblocks/src/schemes/string/sparse.rs:159:50
replace * with + in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/string/sparse.rs
+++ replace * with + in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -151,17 +151,17 @@
// Fixed tables (such as an FSST symbol table or OnPair dictionary) are paid once
// across all valid values rather than scaling with the subsample ratio.
let fixed = FSSTScheme
.fixed_nbytes(&compressed_sample)
.max(OnPairScheme::default().fixed_nbytes(&compressed_sample))
.min(sample_after);
let variable = sample_after - fixed;
let compressed_values =
- fixed as f64 + values as f64 * variable as f64 / sample_before as f64;
+ fixed as f64 + values as f64 + /* ~ changed by cargo-mutants ~ */ variable as f64 / sample_before as f64;
Ok(EstimateVerdict::Ratio(
before as f64 / (compressed_values + indices as f64),
))
},
)))
}
/// Children: values=0, indices=1. The values are the valid strings alone, so the other string
cargo mutants -f vortex-btrblocks/src/schemes/string/sparse.rs -F ':159:50:'
vortex-btrblocks/src/schemes/string/sparse.rs:159:50
replace * with / in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
--- vortex-btrblocks/src/schemes/string/sparse.rs
+++ replace * with / in <impl Scheme for NullDominatedSparseScheme>::expected_compression_ratio
@@ -151,17 +151,17 @@
// Fixed tables (such as an FSST symbol table or OnPair dictionary) are paid once
// across all valid values rather than scaling with the subsample ratio.
let fixed = FSSTScheme
.fixed_nbytes(&compressed_sample)
.max(OnPairScheme::default().fixed_nbytes(&compressed_sample))
.min(sample_after);
let variable = sample_after - fixed;
let compressed_values =
- fixed as f64 + values as f64 * variable as f64 / sample_before as f64;
+ fixed as f64 + values as f64 / /* ~ changed by cargo-mutants ~ */ variable as f64 / sample_before as f64;
Ok(EstimateVerdict::Ratio(
before as f64 / (compressed_values + indices as f64),
))
},
)))
}
/// Children: values=0, indices=1. The values are the valid strings alone, so the other string
cargo mutants -f vortex-btrblocks/src/schemes/string/sparse.rs -F ':159:50:'
- Lenguaje dominante
- Rust
- Estrellas
- 3.2k
- Forks
- 239
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 684
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vortex-data/vortex
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
vortex-data/vortex#12633 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
vortex-data/vortex#12628 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
vortex-data/vortex#12491 ·
Los mantenedores suelen responder en 1 día
-
Fallible constructor for nested_case_whenPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vortex-data/vortex#11425 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
vortex-data/vortex#12635 ·
Los mantenedores suelen responder en 1 día
Todos los issues de vortex-data/vortex
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
marklauter/tsong#110 ·
-
docs enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wasm-bindgen/wasm-bindgen#5503 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
area: engine bug needs milestone
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Mudcrab-Team/mudcrab#1197 · 1 comentario ·
Los mantenedores suelen responder en 1 día