pub struct ConsolidationQuery {
pub query_start: u64,
pub query_end: u64,
pub use_period_boundaries: bool,
}
Expand description
Information about a consolidation query to be executed.
This struct encapsulates all the information needed to execute a single consolidation operation, including the data range to query and file naming strategy.
§Fields
query_start
: Start timestamp for the data query range (inclusive, in nanoseconds).query_end
: End timestamp for the data query range (inclusive, in nanoseconds).use_period_boundaries
: If true, uses period boundaries for file naming; if false, uses actual data timestamps.
§Usage
This struct is used internally by the consolidation system to plan and execute data consolidation operations. It allows the system to:
- Separate query planning from execution.
- Handle complex scenarios like data splitting.
- Optimize file naming strategies.
- Batch multiple operations efficiently.
- Maintain file contiguity across periods.
§Examples
use nautilus_persistence::backend::catalog_operations::ConsolidationQuery;
// Regular consolidation query
let query = ConsolidationQuery {
query_start: 1609459200000000000,
query_end: 1609545600000000000,
use_period_boundaries: true,
};
// Split operation to preserve data
let split_query = ConsolidationQuery {
query_start: 1609459200000000000,
query_end: 1609462800000000000,
use_period_boundaries: false,
};
Fields§
§query_start: u64
Start timestamp for the query range (inclusive, in nanoseconds)
query_end: u64
End timestamp for the query range (inclusive, in nanoseconds)
use_period_boundaries: bool
Whether to use period boundaries for file naming (true) or actual data timestamps (false)
Trait Implementations§
Source§impl Clone for ConsolidationQuery
impl Clone for ConsolidationQuery
Source§fn clone(&self) -> ConsolidationQuery
fn clone(&self) -> ConsolidationQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ConsolidationQuery
impl RefUnwindSafe for ConsolidationQuery
impl Send for ConsolidationQuery
impl Sync for ConsolidationQuery
impl Unpin for ConsolidationQuery
impl UnwindSafe for ConsolidationQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more