Skip to content

Commit

Permalink
Fix clippy warnings/errors (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 authored Oct 26, 2023
1 parent fbaac0f commit 57ce9b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
17 changes: 1 addition & 16 deletions partiql-value/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,7 @@ impl PartialEq for List {

impl PartialOrd for List {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
let mut l = self.0.iter();
let mut r = other.0.iter();

loop {
match (l.next(), r.next()) {
(None, None) => return Some(Ordering::Equal),
(Some(_), None) => return Some(Ordering::Greater),
(None, Some(_)) => return Some(Ordering::Less),
(Some(lv), Some(rv)) => match lv.partial_cmp(rv) {
None => return None,
Some(Ordering::Less) => return Some(Ordering::Less),
Some(Ordering::Greater) => return Some(Ordering::Greater),
Some(Ordering::Equal) => continue,
},
}
}
Some(self.cmp(other))
}
}

Expand Down
10 changes: 2 additions & 8 deletions partiql/benches/bench_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,8 @@ fn create_tests() -> Vec<(String, String)> {
.clone()
.map(|(&a, d)| create_query(vec![(a, *d)].as_slice(), false, false));

let aggs_all = aggs
.into_iter()
.cartesian_product([false].into_iter())
.collect_vec();
let aggs_distinct = aggs
.into_iter()
.cartesian_product([true].into_iter())
.collect_vec();
let aggs_all = aggs.into_iter().cartesian_product([false]).collect_vec();
let aggs_distinct = aggs.into_iter().cartesian_product([true]).collect_vec();

let full_aggs_all = groups
.clone()
Expand Down

1 comment on commit 57ce9b8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PartiQL (rust) Benchmark

Benchmark suite Current: 57ce9b8 Previous: fbaac0f Ratio
arith_agg-avg 1010917 ns/iter (± 28031) 1212926 ns/iter (± 19035) 0.83
arith_agg-avg_distinct 1300979 ns/iter (± 2728) 1582179 ns/iter (± 27164) 0.82
arith_agg-count 1251936 ns/iter (± 5916) 1511903 ns/iter (± 14718) 0.83
arith_agg-count_distinct 1293721 ns/iter (± 4954) 1533225 ns/iter (± 31524) 0.84
arith_agg-min 1259162 ns/iter (± 5519) 1488384 ns/iter (± 19863) 0.85
arith_agg-min_distinct 1298623 ns/iter (± 4017) 1553106 ns/iter (± 17910) 0.84
arith_agg-max 1265816 ns/iter (± 8128) 1524643 ns/iter (± 56117) 0.83
arith_agg-max_distinct 1307918 ns/iter (± 2428) 1560447 ns/iter (± 21059) 0.84
arith_agg-sum 1258395 ns/iter (± 6754) 1523670 ns/iter (± 12597) 0.83
arith_agg-sum_distinct 1298318 ns/iter (± 5421) 1576659 ns/iter (± 13738) 0.82
arith_agg-avg-count-min-max-sum 1517685 ns/iter (± 3595) 1851634 ns/iter (± 8243) 0.82
arith_agg-avg-count-min-max-sum-group_by 1877847 ns/iter (± 5923) 2244821 ns/iter (± 29424) 0.84
arith_agg-avg-count-min-max-sum-group_by-group_as 2707518 ns/iter (± 5247) 3273668 ns/iter (± 36373) 0.83
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct 1754770 ns/iter (± 9772) 2096917 ns/iter (± 21530) 0.84
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct-group_by 2109893 ns/iter (± 12878) 2501800 ns/iter (± 30606) 0.84
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct-group_by-group_as 2951261 ns/iter (± 8525) 3480626 ns/iter (± 39961) 0.85
parse-1 5530 ns/iter (± 10) 6232 ns/iter (± 117) 0.89
parse-15 50738 ns/iter (± 174) 59143 ns/iter (± 912) 0.86
parse-30 99995 ns/iter (± 234) 118572 ns/iter (± 1759) 0.84
compile-1 5551 ns/iter (± 30) 6634 ns/iter (± 98) 0.84
compile-15 43082 ns/iter (± 127) 50958 ns/iter (± 392) 0.85
compile-30 88331 ns/iter (± 64) 103772 ns/iter (± 924) 0.85
plan-1 64531 ns/iter (± 238) 79923 ns/iter (± 1133) 0.81
plan-15 1039325 ns/iter (± 6144) 1281174 ns/iter (± 23005) 0.81
plan-30 2079499 ns/iter (± 3489) 2552074 ns/iter (± 36714) 0.81
eval-1 22028250 ns/iter (± 578575) 23547100 ns/iter (± 629248) 0.94
eval-15 114887145 ns/iter (± 776530) 128954574 ns/iter (± 1564430) 0.89
eval-30 214497420 ns/iter (± 513872) 245984294 ns/iter (± 3999203) 0.87
join 13429 ns/iter (± 20) 15317 ns/iter (± 283) 0.88
simple 3583 ns/iter (± 2) 4070 ns/iter (± 77) 0.88
simple-no 579 ns/iter (± 0) 685 ns/iter (± 14) 0.85
numbers 52 ns/iter (± 0) 62 ns/iter (± 0) 0.84
parse-simple 736 ns/iter (± 0) 937 ns/iter (± 7) 0.79
parse-ion 2234 ns/iter (± 6) 2832 ns/iter (± 23) 0.79
parse-group 7536 ns/iter (± 29) 8551 ns/iter (± 127) 0.88
parse-complex 20279 ns/iter (± 62) 23275 ns/iter (± 464) 0.87
parse-complex-fexpr 29654 ns/iter (± 62) 34548 ns/iter (± 779) 0.86

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.