pub struct PhysicalSortExpr {
pub expr: Arc<dyn PhysicalExpr>,
pub options: SortOptions,
}
Expand description
Represents Sort operation for a column in a RecordBatch
Fields§
§expr: Arc<dyn PhysicalExpr>
Physical expression representing the column to sort
options: SortOptions
Option to specify how the given column should be sorted
Implementations§
source§impl PhysicalSortExpr
impl PhysicalSortExpr
sourcepub fn new(
expr: Arc<dyn PhysicalExpr>,
options: SortOptions,
) -> PhysicalSortExpr
pub fn new( expr: Arc<dyn PhysicalExpr>, options: SortOptions, ) -> PhysicalSortExpr
Create a new PhysicalSortExpr
source§impl PhysicalSortExpr
impl PhysicalSortExpr
sourcepub fn evaluate_to_sort_column(
&self,
batch: &RecordBatch,
) -> Result<SortColumn, DataFusionError>
pub fn evaluate_to_sort_column( &self, batch: &RecordBatch, ) -> Result<SortColumn, DataFusionError>
evaluate the sort expression into SortColumn that can be passed into arrow sort kernel
sourcepub fn satisfy(
&self,
requirement: &PhysicalSortRequirement,
schema: &Schema,
) -> bool
pub fn satisfy( &self, requirement: &PhysicalSortRequirement, schema: &Schema, ) -> bool
Checks whether this sort expression satisfies the given requirement
.
If sort options are unspecified in requirement
, only expressions are
compared for inequality.
sourcepub fn format_list(input: &[PhysicalSortExpr]) -> impl Display
pub fn format_list(input: &[PhysicalSortExpr]) -> impl Display
Returns a Display
able list of PhysicalSortExpr
.
Trait Implementations§
source§impl Clone for PhysicalSortExpr
impl Clone for PhysicalSortExpr
source§fn clone(&self) -> PhysicalSortExpr
fn clone(&self) -> PhysicalSortExpr
Returns a copy 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 moresource§impl Debug for PhysicalSortExpr
impl Debug for PhysicalSortExpr
source§impl Display for PhysicalSortExpr
impl Display for PhysicalSortExpr
source§impl From<PhysicalSortExpr> for PhysicalSortRequirement
impl From<PhysicalSortExpr> for PhysicalSortRequirement
source§fn from(value: PhysicalSortExpr) -> PhysicalSortRequirement
fn from(value: PhysicalSortExpr) -> PhysicalSortRequirement
Converts to this type from the input type.
source§impl From<PhysicalSortRequirement> for PhysicalSortExpr
impl From<PhysicalSortRequirement> for PhysicalSortExpr
source§fn from(value: PhysicalSortRequirement) -> PhysicalSortExpr
fn from(value: PhysicalSortRequirement) -> PhysicalSortExpr
If options is None
, the default sort options ASC, NULLS LAST
is used.
The default is picked to be consistent with PostgreSQL: https://www.postgresql.org/docs/current/queries-order.html
source§impl Hash for PhysicalSortExpr
impl Hash for PhysicalSortExpr
source§impl PartialEq for PhysicalSortExpr
impl PartialEq for PhysicalSortExpr
impl Eq for PhysicalSortExpr
Auto Trait Implementations§
impl Freeze for PhysicalSortExpr
impl !RefUnwindSafe for PhysicalSortExpr
impl Send for PhysicalSortExpr
impl Sync for PhysicalSortExpr
impl Unpin for PhysicalSortExpr
impl !UnwindSafe for PhysicalSortExpr
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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