Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl<T: ComparableForLoserTree> LoserTree<T> {
&self.values[0]
}

pub fn peek_mut(&mut self) -> LoserTreePeekMut<T> {
pub fn peek_mut(&mut self) -> LoserTreePeekMut<'_, T> {
LoserTreePeekMut {
tree: self,
dirty: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl<T: KeyForRadixQueue> RadixQueue<T> {
&self.values[self.entries.get(self.cur_rdx).cloned().unwrap_or_default()]
}

pub fn peek_mut(&mut self) -> RadixTournamentTreePeekMut<T> {
pub fn peek_mut(&mut self) -> RadixTournamentTreePeekMut<'_, T> {
RadixTournamentTreePeekMut {
tree: self,
dirty: false,
Expand Down
2 changes: 1 addition & 1 deletion native-engine/datafusion-ext-commons/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use std::io::{Read, Write};

use arrow::{
array::{Array, ArrayRef, RecordBatchOptions},
array::{ArrayRef, RecordBatchOptions},
datatypes::SchemaRef,
record_batch::RecordBatch,
};
Expand Down
1 change: 0 additions & 1 deletion native-engine/datafusion-ext-commons/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#![feature(core_intrinsics)]
#![feature(slice_swap_unchecked)]
#![feature(vec_into_raw_parts)]
#![feature(let_chains)]

use blaze_jni_bridge::conf::{
BATCH_SIZE, IntConf, SUGGESTED_BATCH_MEM_SIZE, SUGGESTED_BATCH_MEM_SIZE_KWAY_MERGE,
Expand Down
2 changes: 0 additions & 2 deletions native-engine/datafusion-ext-functions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![feature(let_chains)]

use std::sync::Arc;

use datafusion::{common::Result, logical_expr::ScalarFunctionImplementation};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ impl SparkUDAFMemTracker {
Ok(jni_call!(SparkUDAFMemTracker(self.obj.as_obj()).updateUsed()-> bool)?)
}

pub fn as_obj(&self) -> JObject {
pub fn as_obj(&self) -> JObject<'_> {
self.obj.as_obj()
}
}
Expand Down
18 changes: 13 additions & 5 deletions native-engine/datafusion-ext-plans/src/common/timer_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ use futures::{FutureExt, future::BoxFuture};

pub trait TimerHelper {
fn with_timer<T>(&self, f: impl FnOnce() -> T) -> T;
fn with_timer_async<'a, T>(&'a self, f: impl Future<Output = T> + Send + 'a) -> BoxFuture<T>;
fn with_timer_async<'a, T>(
&'a self,
f: impl Future<Output = T> + Send + 'a,
) -> BoxFuture<'a, T>;

fn exclude_timer<T>(&self, f: impl FnOnce() -> T) -> T;
fn exclude_timer_async<'a, T>(&'a self, f: impl Future<Output = T> + Send + 'a)
-> BoxFuture<T>;
fn exclude_timer_async<'a, T>(
&'a self,
f: impl Future<Output = T> + Send + 'a,
) -> BoxFuture<'a, T>;

fn duration(&self) -> Duration;
fn sub_duration(&self, duration: Duration);
Expand All @@ -45,7 +50,10 @@ impl TimerHelper for Time {
f()
}

fn with_timer_async<'a, T>(&'a self, f: impl Future<Output = T> + Send + 'a) -> BoxFuture<T> {
fn with_timer_async<'a, T>(
&'a self,
f: impl Future<Output = T> + Send + 'a,
) -> BoxFuture<'a, T> {
let time = self.clone();
let start_time = Instant::now();
f.inspect(move |_| time.add_duration(start_time.elapsed()))
Expand All @@ -62,7 +70,7 @@ impl TimerHelper for Time {
fn exclude_timer_async<'a, T>(
&'a self,
f: impl Future<Output = T> + Send + 'a,
) -> BoxFuture<T> {
) -> BoxFuture<'a, T> {
let time = self.clone();
let start_time = Instant::now();
f.inspect(move |_| time.sub_duration(start_time.elapsed()))
Expand Down
1 change: 1 addition & 0 deletions native-engine/datafusion-ext-plans/src/generate_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ fn execute_generate(
}
}
$from_row_id = $to_row_id;
let _ = $from_row_id; // suppress unused warning
}};
}

Expand Down
1 change: 0 additions & 1 deletion native-engine/datafusion-ext-plans/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#![feature(get_mut_unchecked)]
#![feature(portable_simd)]
#![feature(ptr_as_ref_unchecked)]
#![feature(let_chains)]

// execution plan implementations
pub mod agg_exec;
Expand Down
4 changes: 2 additions & 2 deletions native-engine/datafusion-ext-plans/src/sort_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ impl SortedBlock for InMemSortedBlock {

struct SpillSortedBlock {
pruned_schema: SchemaRef,
spill: Box<dyn Spill>,
spill_reader: SpillCompressedReader<'static>,
cur_key_reader: SortedKeysReader,
_spill: Box<dyn Spill>,
}

impl SortedBlock for SpillSortedBlock {
Expand Down Expand Up @@ -479,9 +479,9 @@ impl SortedBlockBuilder<SpillSortedBlock, SqueezeKeyCollector> for SpillSortedBl
};
Ok(SpillSortedBlock {
pruned_schema: self.pruned_schema,
spill,
spill_reader,
cur_key_reader: SortedKeysReader::default(),
_spill: spill,
})
}
}
Expand Down
Loading