pub struct PlanNode { /* private fields */ }Expand description
A small bootstrap plan node used by both logical and physical plans.
Implementations§
Source§impl PlanNode
impl PlanNode
Sourcepub fn new(
id: impl Into<String>,
label: impl Into<String>,
kind: ExecutionKind,
) -> Self
pub fn new( id: impl Into<String>, label: impl Into<String>, kind: ExecutionKind, ) -> Self
Create a node with no inputs and default annotations.
Sourcepub fn with_inputs(
self,
inputs: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_inputs( self, inputs: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Attach input node ids to this node.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Replace the human-readable node label.
Sourcepub fn with_partitioning(self, partitioning: Partitioning) -> Self
pub fn with_partitioning(self, partitioning: Partitioning) -> Self
Set the output partitioning strategy for this node.
Sourcepub fn with_broadcast_eligible(self, broadcast_eligible: bool) -> Self
pub fn with_broadcast_eligible(self, broadcast_eligible: bool) -> Self
Set whether this node is eligible for broadcast join optimisation.
Sourcepub fn with_exchange(
self,
key_columns: impl IntoIterator<Item = impl Into<String>>,
num_partitions: u32,
) -> Self
pub fn with_exchange( self, key_columns: impl IntoIterator<Item = impl Into<String>>, num_partitions: u32, ) -> Self
Attach an exchange (repartition) node to the plan.
This is a convenience wrapper around with_partitioning that creates a
Hash partitioning on the given key columns with num_partitions
buckets. Used by the DataFrame::repartition() API.
Sourcepub fn with_estimated_rows(self, estimated_rows: Option<u64>) -> Self
pub fn with_estimated_rows(self, estimated_rows: Option<u64>) -> Self
Set the estimated output row count for this node.
Sourcepub fn with_output_schema(self, schema: PlanSchema) -> Self
pub fn with_output_schema(self, schema: PlanSchema) -> Self
Set the output schema for this node.
Sourcepub fn kind(&self) -> ExecutionKind
pub fn kind(&self) -> ExecutionKind
Execution kind for this node.
Sourcepub fn partitioning(&self) -> &Partitioning
pub fn partitioning(&self) -> &Partitioning
Output partitioning strategy.
Sourcepub fn set_partitioning(&mut self, partitioning: Partitioning)
pub fn set_partitioning(&mut self, partitioning: Partitioning)
Mutate the output partitioning strategy in-place.
Sourcepub fn broadcast_eligible(&self) -> bool
pub fn broadcast_eligible(&self) -> bool
Whether this node is eligible for broadcast join optimisation.
Sourcepub fn estimated_rows(&self) -> Option<u64>
pub fn estimated_rows(&self) -> Option<u64>
Estimated output row count.
Sourcepub fn output_schema(&self) -> &PlanSchema
pub fn output_schema(&self) -> &PlanSchema
Output schema for this node.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PlanNode
impl<'de> Deserialize<'de> for PlanNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PlanNode
impl StructuralPartialEq for PlanNode
Auto Trait Implementations§
impl Freeze for PlanNode
impl RefUnwindSafe for PlanNode
impl Send for PlanNode
impl Sync for PlanNode
impl Unpin for PlanNode
impl UnsafeUnpin for PlanNode
impl UnwindSafe for PlanNode
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request