From 467d4a2d49043101c56707bb502f67d13c78fdb0 Mon Sep 17 00:00:00 2001 From: zenghua Date: Wed, 1 Nov 2023 17:31:42 +0800 Subject: [PATCH] replace get_mut_unchecked with make_mut for SortKeyBatchRanges Signed-off-by: zenghua --- rust/lakesoul-io/src/sorted_merge/combiner.rs | 2 +- rust/lakesoul-io/src/sorted_merge/sort_key_range.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/lakesoul-io/src/sorted_merge/combiner.rs b/rust/lakesoul-io/src/sorted_merge/combiner.rs index 5a8aa0e47..769cb2051 100644 --- a/rust/lakesoul-io/src/sorted_merge/combiner.rs +++ b/rust/lakesoul-io/src/sorted_merge/combiner.rs @@ -200,7 +200,7 @@ impl MinHeapSortKeyBatchRangeCombiner { } fn get_mut_current_sort_key_range(&mut self) -> &mut SortKeyBatchRanges { - Arc::get_mut(&mut self.current_sort_key_range).unwrap() + Arc::make_mut(&mut self.current_sort_key_range) } } diff --git a/rust/lakesoul-io/src/sorted_merge/sort_key_range.rs b/rust/lakesoul-io/src/sorted_merge/sort_key_range.rs index 94c5b90dd..a4abe745c 100644 --- a/rust/lakesoul-io/src/sorted_merge/sort_key_range.rs +++ b/rust/lakesoul-io/src/sorted_merge/sort_key_range.rs @@ -188,7 +188,7 @@ impl Clone for SortKeyArrayRange { } // Multiple ranges with same sorted primary key from variant source record_batch. These ranges will be merged into ONE row of target record_batch finnally. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct SortKeyBatchRanges { // vector with length=column_num that holds a Vector of SortKeyArrayRange to be merged for each column pub(crate) sort_key_array_ranges: Vec>,