pub enum ScanOrdering {
Unordered,
Concatenated {
columns: Vec<ScanSortColumn>,
bounds: OrderingBounds,
},
PerFile {
columns: Vec<ScanSortColumn>,
},
}Expand description
How a partition scan’s declared output ordering is realized.
Two scan shapes exist: a single sequential file group spanning every input partition
(Unordered, Concatenated) and one file group per input partition (PerFile, scanned by k
readers for a downstream SortPreservingMergeExec). Unordered and Concatenated build and
execute the identical single-file-group scan – they differ only in whether the resulting order
is declared to DataFusion, not in scan shape or execution strategy (see
ScanOrdering::declares_concatenated_ordering).
Variants§
Unordered
No declared ordering (today’s default).
Concatenated
All files form one sequential file group that concatenates in globally-sorted order.
Requires non-overlapping leading-column bounds (checked against bounds).
PerFile
Each file is internally sorted by columns; files may overlap arbitrarily. The scan
yields one ordered plan partition per file, for a downstream SortPreservingMergeExec.
columns should be non-empty – SqlBatchView::with_merge_sort_order rejects an empty
list at construction, but this enum and View::get_scan_output_ordering are public, so
that is not the only construction path. An empty columns is still safe: it never
certifies (see Partition::certifies_sort_order), so make_partitioned_execution_plan
degrades it to Unordered for any non-empty partition rather than planning and recording a
vacuous ordering.
Fields
columns: Vec<ScanSortColumn>Implementations§
Source§impl ScanOrdering
impl ScanOrdering
Sourcepub fn declares_concatenated_ordering(&self) -> bool
pub fn declares_concatenated_ordering(&self) -> bool
True when this ordering declares a concatenating scan’s global order (Concatenated).
PerFile returns false because a per-file ordering only becomes a global one through a
downstream merge – it is the other strategy, not an undeclared version of this one. A
bool, not the columns themselves: nothing on the concatenating path inspects the declared
columns, only whether an ordering was declared at all (see
QueryMerger::execute_concatenated_merge in merge.rs).
Trait Implementations§
Source§impl Clone for ScanOrdering
impl Clone for ScanOrdering
Source§fn clone(&self) -> ScanOrdering
fn clone(&self) -> ScanOrdering
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ScanOrdering
impl RefUnwindSafe for ScanOrdering
impl Send for ScanOrdering
impl Sync for ScanOrdering
impl Unpin for ScanOrdering
impl UnsafeUnpin for ScanOrdering
impl UnwindSafe for ScanOrdering
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].