pub struct ProjectionPlan {
pub physical_projection: Projection,
pub requested_output_expr: Option<Vec<(Expr, String)>>,
/* private fields */
}Fields§
§physical_projection: ProjectionThe physical schema that must be loaded from the dataset
requested_output_expr: Option<Vec<(Expr, String)>>If present, expressions that represent the output columns. These expressions run on the output of the physical projection.
If not present, the output is the physical projection.
Note: this doesn’t include _distance, and _rowid
Implementations§
Source§impl ProjectionPlan
impl ProjectionPlan
Sourcepub fn new(base: Arc<dyn Projectable>) -> Self
pub fn new(base: Arc<dyn Projectable>) -> Self
Create a new projection plan which projects all columns and does not include any expressions
Sourcepub fn project_from_expressions(
&mut self,
columns: &[(impl AsRef<str>, impl AsRef<str>)],
) -> Result<()>
pub fn project_from_expressions( &mut self, columns: &[(impl AsRef<str>, impl AsRef<str>)], ) -> Result<()>
Set the projection from SQL expressions
Sourcepub fn project_from_schema(&mut self, projection: &Schema)
pub fn project_from_schema(&mut self, projection: &Schema)
Set the projection from a schema
This plan will have no complex expressions
pub fn to_physical_exprs( &self, current_schema: &ArrowSchema, ) -> Result<Vec<(Arc<dyn PhysicalExpr>, String)>>
pub fn include_row_id(&mut self)
pub fn include_row_addr(&mut self)
pub fn output_schema(&self) -> Result<ArrowSchema>
pub async fn project_batch(&self, batch: RecordBatch) -> Result<RecordBatch>
Trait Implementations§
Source§impl Clone for ProjectionPlan
impl Clone for ProjectionPlan
Source§fn clone(&self) -> ProjectionPlan
fn clone(&self) -> ProjectionPlan
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ProjectionPlan
impl !RefUnwindSafe for ProjectionPlan
impl Send for ProjectionPlan
impl Sync for ProjectionPlan
impl Unpin for ProjectionPlan
impl !UnwindSafe for ProjectionPlan
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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