Skip to content

Commit

Permalink
fix one safety warning and ignore some slow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Jul 5, 2024
1 parent 5faf167 commit dff2e47
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ twox-hash = "1.6.3"

[features]
default = []
nightly = []

[profile.release]
debug = true
Expand Down
2 changes: 2 additions & 0 deletions core/src/execution/datafusion/expressions/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,7 @@ mod tests {
use super::*;

#[test]
#[cfg_attr(miri, ignore)] // test takes too long with miri
fn timestamp_parser_test() {
// write for all formats
assert_eq!(
Expand Down Expand Up @@ -1683,6 +1684,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)] // test takes too long with miri
fn test_cast_string_to_timestamp() {
let array: ArrayRef = Arc::new(StringArray::from(vec![
Some("2020-01-01T12:34:56.123456"),
Expand Down
1 change: 1 addition & 0 deletions core/src/execution/datafusion/expressions/xxhash64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ mod test {
use twox_hash::XxHash64;

#[test]
#[cfg_attr(miri, ignore)] // test takes too long with miri
fn test_xxhash64_random() {
let mut rng = rand::thread_rng();
for len in 0..128 {
Expand Down
1 change: 1 addition & 0 deletions core/src/execution/datafusion/shuffle_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,7 @@ mod test {
}

#[test]
#[cfg_attr(miri, ignore)] // miri can't call foreign function `ZSTD_createCCtx`
fn test_insert_larger_batch() {
let schema = Arc::new(Schema::new(vec![Field::new("a", DataType::Utf8, true)]));
let mut b = StringBuilder::new();
Expand Down
3 changes: 3 additions & 0 deletions core/src/execution/kernels/temporal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,7 @@ mod tests {
use std::sync::Arc;

#[test]
#[cfg_attr(miri, ignore)] // test takes too long with miri
fn test_date_trunc() {
let size = 1000;
let mut vec: Vec<i32> = Vec::with_capacity(size);
Expand Down Expand Up @@ -962,6 +963,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)] // test takes too long with miri
fn test_timestamp_trunc() {
let size = 1000;
let mut vec: Vec<i64> = Vec::with_capacity(size);
Expand Down Expand Up @@ -998,6 +1000,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)] // test takes too long with miri
// This test only verifies that the various input array types work. Actually correctness to
// ensure this produces the same results as spark is verified in the JVM tests
fn test_timestamp_trunc_array_fmt_dyn() {
Expand Down
3 changes: 2 additions & 1 deletion core/src/execution/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ where
// because they are defined as Vec<Vec<T>>
ptr::copy_nonoverlapping(
bucket.as_ptr(),
self.get_unchecked_mut(pos),
//self.get_unchecked_mut(pos),
self.as_mut_ptr().add(pos),
bucket.len(),
);
}
Expand Down

0 comments on commit dff2e47

Please sign in to comment.