Struct re_dataframe::query::QueryHandleState
source · struct QueryHandleState {
view_contents: Vec<ColumnDescriptor>,
selected_contents: Vec<(usize, ColumnDescriptor)>,
selected_static_values: Vec<Option<UnitChunkShared>>,
filtered_index: Index,
arrow_schema: Schema,
view_chunks: Vec<Vec<(AtomicU64, Chunk)>>,
cur_row: AtomicU64,
unique_index_values: Vec<IndexValue>,
}
Expand description
Internal private state. Lazily computed.
Fields§
§view_contents: Vec<ColumnDescriptor>
Describes the columns that make up this view.
See [QueryExpression::view_contents
].
selected_contents: Vec<(usize, ColumnDescriptor)>
Describes the columns specifically selected to be returned from this view.
All returned rows will have an Arrow schema that matches this selection.
Columns that do not yield any data will still be present in the results, filled with null values.
The extra usize
is the index in QueryHandleState::view_contents
that this selection
points to.
See also QueryHandleState::arrow_schema
.
selected_static_values: Vec<Option<UnitChunkShared>>
This keeps track of the static data associated with each entry in selected_contents
, if any.
This is queried only once during init, and will override all cells that follow.
selected_contents
: QueryHandleState::selected_contents
filtered_index: Index
The actual index filter in use, since the user-specified one is optional.
This just defaults to Index::default()
if the user hasn’t specified any: the actual
value is irrelevant since this means we are only concerned with static data anyway.
arrow_schema: Schema
The Arrow schema that corresponds to the selected_contents
.
All returned rows will have this schema.
view_chunks: Vec<Vec<(AtomicU64, Chunk)>>
All the [Chunk
]s included in the view contents.
These are already sorted, densified, vertically sliced, and latest-deduped according to the query.
The atomic counter is used as a cursor which keeps track of our current position within each individual chunk. Because chunks are allowed to overlap, we might need to rebound between two or more chunks during our iteration.
This vector’s entries correspond to those in QueryHandleState::view_contents
.
Note: time and column entries don’t have chunks – inner vectors will be empty.
cur_row: AtomicU64
Tracks the current row index: the position of the iterator. For QueryHandle::next_row
.
This represents the number of rows that the caller has iterated on: it is completely unrelated to the cursors used to track the current position in each individual chunk.
The corresponding index value can be obtained using unique_index_values[cur_row]
.
unique_index_values[cur_row]
: QueryHandleState::unique_index_values
unique_index_values: Vec<IndexValue>
All unique index values that can possibly be returned by this query.
Guaranteed ascendingly sorted and deduped.
See also QueryHandleState::cur_row
.
Auto Trait Implementations§
impl !Freeze for QueryHandleState
impl !RefUnwindSafe for QueryHandleState
impl Send for QueryHandleState
impl Sync for QueryHandleState
impl Unpin for QueryHandleState
impl !UnwindSafe for QueryHandleState
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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>
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