pub struct ExternalSort<'a> { /* private fields */ }Expand description
Physical external sort with stable SQL ordering and optional global top-K.
Implementations§
Source§impl<'a> ExternalSort<'a>
impl<'a> ExternalSort<'a>
pub fn new( child: Box<dyn PhysicalOperator + 'a>, keys: Vec<SortKey>, evaluator: SharedExpressionEvaluator<'a>, keep: Option<usize>, work_mem_bytes: usize, ) -> Self
Sourcepub fn with_spill_directory(self, directory: impl Into<PathBuf>) -> Self
pub fn with_spill_directory(self, directory: impl Into<PathBuf>) -> Self
Place sort runs in a caller-selected temporary-data directory.
pub fn initial_run_count(&self) -> usize
pub fn merge_pass_count(&self) -> usize
Trait Implementations§
Source§impl PhysicalOperator for ExternalSort<'_>
impl PhysicalOperator for ExternalSort<'_>
Source§fn row_schema(&self) -> &RowSchema
fn row_schema(&self) -> &RowSchema
Complete logical-to-physical row layout emitted by this operator. Every
Batch returned by Self::next must carry this exact schema; operators must reject a child that violates that invariant.Source§fn output_ordering(&self) -> &[PhysicalOrder]
fn output_ordering(&self) -> &[PhysicalOrder]
Leading output ordering known to be preserved by this operator.
fn open(&mut self) -> ExecResult<()>
fn next(&mut self) -> ExecResult<Option<Batch>>
fn close(&mut self) -> ExecResult<()>
Source§fn estimated_cardinality(&self) -> Option<u64>
fn estimated_cardinality(&self) -> Option<u64>
Planner/runtime cardinality estimate for choosing physical strategies.
None means the operator cannot provide a useful estimate. The value
is advisory rather than a correctness bound.Source§fn consume_into_aggregate(
&mut self,
_executor: &mut dyn AggregateExecutor,
) -> ExecResult<bool>
fn consume_into_aggregate( &mut self, _executor: &mut dyn AggregateExecutor, ) -> ExecResult<bool>
Let a leaf consume its native projected rows directly into an
aggregate executor. Returning
false promises that no input was
consumed, so the caller can fall back to ordinary Batch pulls.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExternalSort<'a>
impl<'a> !Sync for ExternalSort<'a>
impl<'a> !UnwindSafe for ExternalSort<'a>
impl<'a> Freeze for ExternalSort<'a>
impl<'a> Send for ExternalSort<'a>
impl<'a> Unpin for ExternalSort<'a>
impl<'a> UnsafeUnpin for ExternalSort<'a>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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