Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove sequence number from ScanRequest #2785

Merged
merged 1 commit into from
Nov 21, 2023
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
2 changes: 0 additions & 2 deletions src/metric-engine/src/metadata_region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ impl MetadataRegion {
let filter_expr = col(METADATA_SCHEMA_KEY_COLUMN_NAME).eq(lit(key));

ScanRequest {
sequence: None,
projection: Some(vec![METADATA_SCHEMA_VALUE_COLUMN_INDEX]),
filters: vec![filter_expr.into()],
output_ordering: None,
Expand Down Expand Up @@ -390,7 +389,6 @@ mod test {
let key = "test_key";
let expected_filter_expr = col(METADATA_SCHEMA_KEY_COLUMN_NAME).eq(lit(key));
let expected_scan_request = ScanRequest {
sequence: None,
projection: Some(vec![METADATA_SCHEMA_VALUE_COLUMN_INDEX]),
filters: vec![expected_filter_expr.into()],
output_ordering: None,
Expand Down
1 change: 0 additions & 1 deletion src/mito2/src/engine/projection_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ async fn test_scan_projection() {

// Scans tag_1, field_1, ts
let request = ScanRequest {
sequence: None,
projection: Some(vec![1, 3, 4]),
filters: Vec::new(),
output_ordering: None,
Expand Down
7 changes: 1 addition & 6 deletions src/store-api/src/storage/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use snafu::{OptionExt, ResultExt};
use crate::error::{
BuildColumnDescriptorSnafu, Error, InvalidDefaultConstraintSnafu, InvalidRawRegionRequestSnafu,
};
use crate::storage::{ColumnDescriptor, ColumnDescriptorBuilder, RegionDescriptor, SequenceNumber};
use crate::storage::{ColumnDescriptor, ColumnDescriptorBuilder, RegionDescriptor};

/// Write request holds a collection of updates to apply to a region.
///
Expand All @@ -48,11 +48,6 @@ pub trait WriteRequest: Send {

#[derive(Default, Clone, Debug, PartialEq, Eq)]
pub struct ScanRequest {
/// Max sequence number to read, None for latest sequence.
///
/// Default is None. Only returns data whose sequence number is less than or
/// equal to the `sequence`.
pub sequence: Option<SequenceNumber>,
/// Indices of columns to read, `None` to read all columns.
pub projection: Option<Vec<usize>>,
/// Filters pushed down
Expand Down
Loading