Struct spark_connect_rs::plan::LogicalPlanBuilder
source · pub struct LogicalPlanBuilder { /* private fields */ }
Expand description
Implements a struct to hold the current Relation which represents an unresolved Logical Plan
Implementations§
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(self) -> Relation
pub fn plan_id(self) -> i64
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
pub fn plan_root(op_type: LogicalPlanBuilder) -> Plan
sourcepub fn plan_cmd(command_type: CommandType) -> Plan
pub fn 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(self, alias: &str) -> LogicalPlanBuilder
pub fn aggregate<T>(
input: LogicalPlanBuilder,
group_type: GroupType,
grouping_cols: Vec<Expression>,
agg_expression: T,
pivot_col: Option<Expression>,
pivot_vals: Option<Vec<Literal>>
) -> LogicalPlanBuilderwhere
T: ToVecExpr,
pub fn unpivot( self, ids: Vec<Expression>, values: Option<Vec<Expression>>, variable_column_name: &str, value_column_name: &str ) -> LogicalPlanBuilder
pub fn local_relation( batch: &RecordBatch ) -> Result<LogicalPlanBuilder, SparkError>
pub fn corr(self, col1: &str, col2: &str) -> LogicalPlanBuilder
pub fn cov(self, col1: &str, col2: &str) -> LogicalPlanBuilder
pub fn crosstab(self, col1: &str, col2: &str) -> LogicalPlanBuilder
pub fn describe<'a, I>(self, cols: Option<I>) -> LogicalPlanBuilder
pub fn distinct(self) -> LogicalPlanBuilder
pub fn drop<T>(self, cols: T) -> LogicalPlanBuilderwhere
T: ToVecExpr,
pub fn drop_duplicates<'a, I>(self, cols: Option<I>) -> LogicalPlanBuilder
pub fn dropna<'a, I>( self, how: &str, threshold: Option<i32>, subset: Option<I> ) -> LogicalPlanBuilder
pub fn to_df<'a, I>(self, cols: I) -> LogicalPlanBuilderwhere
I: IntoIterator<Item = &'a str>,
pub fn exceptAll(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn unionAll(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn union(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn unionByName( self, other: LogicalPlanBuilder, allow_missing_columns: Option<bool> ) -> LogicalPlanBuilder
pub fn substract(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn intersect(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn intersectAll(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn filter<T>(self, condition: T) -> LogicalPlanBuilderwhere
T: ToFilterExpr,
pub fn freqItems<'a, I>(
self,
cols: I,
support: Option<f64>
) -> LogicalPlanBuilderwhere
I: IntoIterator<Item = &'a str>,
pub fn hint<T>(self, name: &str, parameters: Option<T>) -> LogicalPlanBuilderwhere
T: ToVecExpr,
pub fn join<'a, T, I>( self, right: LogicalPlanBuilder, join_condition: Option<T>, join_type: JoinType, using_columns: I ) -> LogicalPlanBuilder
pub fn limit(self, limit: i32) -> LogicalPlanBuilder
pub fn offset(self, num: i32) -> LogicalPlanBuilder
pub fn repartition( self, num_partitions: u32, shuffle: Option<bool> ) -> LogicalPlanBuilder
pub fn sample( self, lower_bound: f64, upper_bound: f64, with_replacement: Option<bool>, seed: Option<i64> ) -> LogicalPlanBuilder
pub fn select<T>(self, cols: T) -> LogicalPlanBuilderwhere
T: ToVecExpr,
pub fn select_expr<'a, I>(self, cols: I) -> LogicalPlanBuilderwhere
I: IntoIterator<Item = &'a str>,
pub fn sort<I, T>(self, cols: I) -> LogicalPlanBuilderwhere
T: ToExpr,
I: IntoIterator<Item = T>,
pub fn withColumn<T>(self, colName: &str, col: T) -> LogicalPlanBuilderwhere
T: ToExpr,
pub fn withColumns<I, K, T>(self, colMap: I) -> LogicalPlanBuilder
pub fn withColumnsRenamed<I, K, V>(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