From f44862aaac0b8dd1c2f6e56684a01a7e978f1006 Mon Sep 17 00:00:00 2001 From: evenyag Date: Tue, 5 Nov 2024 17:47:32 +0800 Subject: [PATCH] feat: update log --- src/mito2/src/read.rs | 35 ++++++++++++++++++----------------- src/query/src/part_sort.rs | 1 + 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/mito2/src/read.rs b/src/mito2/src/read.rs index 9ada0cafd5..4c03ee7b98 100644 --- a/src/mito2/src/read.rs +++ b/src/mito2/src/read.rs @@ -501,12 +501,12 @@ impl Batch { } let timestamps = self.timestamps_native().unwrap(); - let sequences = self.sequences.as_arrow().values(); + // let sequences = self.sequences.as_arrow().values(); for (i, window) in timestamps.windows(2).enumerate() { let current = window[0]; let next = window[1]; - let current_sequence = sequences[i]; - let next_sequence = sequences[i + 1]; + // let current_sequence = sequences[i]; + // let next_sequence = sequences[i + 1]; match current.cmp(&next) { Ordering::Less => { // The current timestamp is less than the next timestamp. @@ -514,12 +514,12 @@ impl Batch { } Ordering::Equal => { // The current timestamp is equal to the next timestamp. - if current_sequence < next_sequence { - return Err(format!( - "sequence are not monotonic: ts {} == {} but current sequence {} < {}, index: {}", - current, next, current_sequence, next_sequence, i - )); - } + // if current_sequence < next_sequence { + // return Err(format!( + // "sequence are not monotonic: ts {} == {} but current sequence {} < {}, index: {}", + // current, next, current_sequence, next_sequence, i + // )); + // } } Ordering::Greater => { // The current timestamp is greater than the next timestamp. @@ -560,14 +560,15 @@ impl Batch { )); } // Checks the sequence. - if self.last_sequence() >= other.first_sequence() { - return Ok(()); - } - Err(format!( - "sequences are not monotonic: {:?} < {:?}", - self.last_sequence(), - other.first_sequence() - )) + Ok(()) + // if self.last_sequence() >= other.first_sequence() { + // return Ok(()); + // } + // Err(format!( + // "sequences are not monotonic: {:?} < {:?}", + // self.last_sequence(), + // other.first_sequence() + // )) } } diff --git a/src/query/src/part_sort.rs b/src/query/src/part_sort.rs index 3be644e904..f9c926d2b5 100644 --- a/src/query/src/part_sort.rs +++ b/src/query/src/part_sort.rs @@ -517,6 +517,7 @@ impl PartSortStream { } self.buffer.push(batch); + // keep polling until boundary(a empty RecordBatch) is reached continue; }