Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
forsaken628 committed Dec 10, 2024
1 parent 93713a0 commit 7fab593
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/query/expression/src/sampler/fixed_rate_sampler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl<R: Rng> FixedRateSampler<R> {
while self
.indices
.front()
.map_or(false, |indices| indices.len() == self.block_size)
.is_some_and(|indices| indices.len() == self.block_size)
{
let indices = self.indices.pop_front().unwrap();
let block = DataBlock::take_blocks(&self.sparse_blocks, &indices, indices.len());
Expand Down Expand Up @@ -153,6 +153,7 @@ mod rate_sampling {
}

impl<R: Rng> Sampling<R> {
#[allow(dead_code)]
pub fn new(range: RangeInclusive<usize>, r: R) -> Self {
Self { range, r }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ where
for<'a> T::ScalarRef<'a>: Ord + Send,
{
const IS_ASC_COLUMN: bool = true;
type Item<'a> = T::ScalarRef<'a>
type Item<'a>
= T::ScalarRef<'a>
where Self: 'a;

type Type = T;
Expand Down Expand Up @@ -83,7 +84,8 @@ where
for<'a> T::ScalarRef<'a>: Ord + Send,
{
const IS_ASC_COLUMN: bool = false;
type Item<'a> = Reverse<T::ScalarRef<'a>>
type Item<'a>
= Reverse<T::ScalarRef<'a>>
where Self: 'a;

type Type = T;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub fn has_order_field(schema: &DataSchema) -> bool {
schema
.fields
.last()
.map_or(false, |f| f.name() == ORDER_COL_NAME)
.is_some_and(|f| f.name() == ORDER_COL_NAME)
}

#[inline(always)]
Expand Down

0 comments on commit 7fab593

Please sign in to comment.