mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-24 00:40:40 +00:00
feat: filter batch by sequence in memtable (#5367)
* feat: add seq field * feat: filter by sequence * chore: per review * docs: explain why not prune * chore: correct doc * test: test filter by seq
This commit is contained in:
@@ -16,6 +16,8 @@ use common_recordbatch::OrderOption;
|
||||
use datafusion_expr::expr::Expr;
|
||||
use strum::Display;
|
||||
|
||||
use crate::storage::SequenceNumber;
|
||||
|
||||
/// A hint on how to select rows from a time-series.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display)]
|
||||
pub enum TimeSeriesRowSelector {
|
||||
@@ -39,4 +41,8 @@ pub struct ScanRequest {
|
||||
pub limit: Option<usize>,
|
||||
/// Optional hint to select rows from time-series.
|
||||
pub series_row_selector: Option<TimeSeriesRowSelector>,
|
||||
/// Optional constraint on the sequence number of the rows to read.
|
||||
/// If set, only rows with a sequence number lesser or equal to this value
|
||||
/// will be returned.
|
||||
pub sequence: Option<SequenceNumber>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user