Struct tidb_query_executors::slow_hash_aggr_executor::SlowHashAggregationImpl [−][src]
Fields
states: Vec<Box<dyn AggrFunctionState>>
groups: HashMap<GroupKeyRefUnsafe, usize>
The value is the group index. states
and group_key_offsets
are stored in
the order of group index.
group_by_exps: Vec<RpnExpression>
extra_group_by_col_index: Vec<usize>
Extra group by columns store the bytes columns in original data form while default columns store them in sortkey form. The sortkey form is used to aggr on while the original form is to be returned as results.
For example, the bytes column at index i will be stored in sortkey form at column i
and in original data form at column extra_group_by_col_index[i]
.
original_group_by_col_index: Vec<usize>
The sequence of group by column index which are in original form and are in the same order as group_by_exps by substituting bytes columns index for extra group by column index.
group_key_buffer: Box<Vec<u8>>
Encoded group keys are stored in this buffer sequentially. Offsets of each encoded
element are stored in group_key_offsets
.
GroupKeyRefUnsafe
contains a raw pointer to this buffer.
group_key_offsets: Vec<usize>
The offsets of encoded keys in group_key_buffer
. This Vec
always has a leading 0
element. Then, the begin and end offsets of the “i”-th column of the group key whose group
index is “j” are group_key_offsets[j * group_by_col_len + i]
and
group_key_offsets[j * group_by_col_len + i + 1]
.
group_by_col_len = group_by_exps.len() + extra_group_by_col_index.len()
states_offset_each_logical_row: Vec<usize>
group_by_results_unsafe: Vec<RpnStackNode<'static>>
Stores evaluation results of group by expressions. It is just used to reduce allocations. The lifetime is not really ’static. The elements are only valid in the same batch where they are added.
cached_encoded_result: Vec<Option<Vec<u8>>>
Cached encoded results for calculated Scalar results
Trait Implementations
impl<Src: BatchExecutor> AggregationExecutorImpl<Src> for SlowHashAggregationImpl
[src]
fn prepare_entities(&mut self, entities: &mut Entities<Src>)
[src]
fn process_batch_input(
&mut self,
entities: &mut Entities<Src>,
input_physical_columns: LazyBatchColumnVec,
input_logical_rows: &[usize]
) -> Result<()>
[src]
&mut self,
entities: &mut Entities<Src>,
input_physical_columns: LazyBatchColumnVec,
input_logical_rows: &[usize]
) -> Result<()>
fn groups_len(&self) -> usize
[src]
fn iterate_available_groups(
&mut self,
entities: &mut Entities<Src>,
src_is_drained: bool,
iteratee: impl FnMut(&mut Entities<Src>, &[Box<dyn AggrFunctionState>]) -> Result<()>
) -> Result<Vec<LazyBatchColumn>>
[src]
&mut self,
entities: &mut Entities<Src>,
src_is_drained: bool,
iteratee: impl FnMut(&mut Entities<Src>, &[Box<dyn AggrFunctionState>]) -> Result<()>
) -> Result<Vec<LazyBatchColumn>>
fn is_partial_results_ready(&self) -> bool
[src]
Slow hash aggregation can output aggregate results only if the source is drained.
impl Send for SlowHashAggregationImpl
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SlowHashAggregationImpl
impl !Sync for SlowHashAggregationImpl
impl Unpin for SlowHashAggregationImpl
impl !UnwindSafe for SlowHashAggregationImpl
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(ctx: &mut EvalContext, from: W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,