Struct spark_connect_rs::plan::LogicalPlanBuilder
source · pub struct LogicalPlanBuilder {
pub relation: Relation,
pub plan_id: i64,
}Expand description
Implements a struct to hold the current Relation which represents an unresolved Logical Plan
Fields§
§relation: RelationA Relation object that contains the unresolved logical plan
plan_id: i64Implementations§
source§impl LogicalPlanBuilder
impl LogicalPlanBuilder
sourcepub fn new(relation: Relation) -> LogicalPlanBuilder
pub fn new(relation: Relation) -> LogicalPlanBuilder
Create a new Logical Plan from an initial spark::Relation
pub fn relation_input(self) -> Option<Box<Relation>>
sourcepub fn build_plan_root(self) -> Plan
pub fn build_plan_root(self) -> Plan
Build the Spark spark::Plan for a Relation
sourcepub fn build_plan_cmd(command_type: CommandType) -> Plan
pub fn build_plan_cmd(command_type: CommandType) -> Plan
Build the Spark spark::Plan for a spark::command::CommandType
sourcepub fn from(rel_type: RelType) -> LogicalPlanBuilder
pub fn from(rel_type: RelType) -> LogicalPlanBuilder
Create a relation from an existing LogicalPlanBuilder this will add additional actions to the Relation
pub fn alias(&mut self, alias: &str) -> LogicalPlanBuilder
pub fn corr(&mut self, col1: &str, col2: &str) -> LogicalPlanBuilder
pub fn cov(&mut self, col1: &str, col2: &str) -> LogicalPlanBuilder
pub fn crosstab(&mut self, col1: &str, col2: &str) -> LogicalPlanBuilder
pub fn describe<'a, I>(&mut self, cols: Option<I>) -> LogicalPlanBuilder
pub fn distinct(&mut self) -> LogicalPlanBuilder
pub fn drop<T: ToVecExpr>(&mut self, cols: T) -> LogicalPlanBuilder
pub fn drop_duplicates<'a, I>(&mut self, cols: Option<I>) -> LogicalPlanBuilder
pub fn dropna<'a, I>( &mut self, how: &str, threshold: Option<i32>, subset: Option<I> ) -> LogicalPlanBuilder
pub fn to_df<'a, I>(&mut self, cols: I) -> LogicalPlanBuilderwhere
I: IntoIterator<Item = &'a str>,
pub fn exceptAll(&mut self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn unionAll(&mut self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn union(&mut self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn unionByName( &mut self, other: LogicalPlanBuilder, allow_missing_columns: Option<bool> ) -> LogicalPlanBuilder
pub fn substract(&mut self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn intersect(&mut self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn intersectAll(&mut self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn filter<T: ToFilterExpr>(&mut self, condition: T) -> LogicalPlanBuilder
pub fn freqItems<'a, I>(
&mut self,
cols: I,
support: Option<f64>
) -> LogicalPlanBuilderwhere
I: IntoIterator<Item = &'a str>,
pub fn hint<T: ToVecExpr>( &mut self, name: &str, parameters: Option<T> ) -> LogicalPlanBuilder
pub fn join<'a, T, I>(
&mut self,
right: LogicalPlanBuilder,
join_condition: Option<T>,
join_type: JoinType,
using_columns: I
) -> LogicalPlanBuilderwhere
T: ToExpr,
I: IntoIterator<Item = &'a str>,
pub fn limit(&mut self, limit: i32) -> LogicalPlanBuilder
pub fn offset(&mut self, num: i32) -> LogicalPlanBuilder
pub fn repartition( &mut self, num_partitions: u32, shuffle: Option<bool> ) -> LogicalPlanBuilder
pub fn sample( &mut self, lower_bound: f64, upper_bound: f64, with_replacement: Option<bool>, seed: Option<i64> ) -> LogicalPlanBuilder
pub fn select<T: ToVecExpr>(&mut self, cols: T) -> LogicalPlanBuilder
pub fn select_expr<'a, I>(&mut self, cols: I) -> LogicalPlanBuilderwhere
I: IntoIterator<Item = &'a str>,
pub fn sort<I>(&mut self, cols: I) -> LogicalPlanBuilderwhere
I: IntoIterator<Item = Column>,
pub fn withColumn(&mut self, colName: &str, col: Column) -> LogicalPlanBuilder
pub fn withColumns<I, K>(&mut self, colMap: I) -> LogicalPlanBuilder
pub fn withColumnsRenamed<I, K, V>(&mut self, cols: I) -> LogicalPlanBuilder
Trait Implementations§
source§impl Clone for LogicalPlanBuilder
impl Clone for LogicalPlanBuilder
source§fn clone(&self) -> LogicalPlanBuilder
fn clone(&self) -> LogicalPlanBuilder
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 moreAuto Trait Implementations§
impl Freeze for LogicalPlanBuilder
impl RefUnwindSafe for LogicalPlanBuilder
impl Send for LogicalPlanBuilder
impl Sync for LogicalPlanBuilder
impl Unpin for LogicalPlanBuilder
impl UnwindSafe for LogicalPlanBuilder
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request