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

source

pub fn new(relation: Relation) -> LogicalPlanBuilder

Create a new Logical Plan from an initial spark::Relation

source

pub fn relation(self) -> Relation

source

pub fn plan_id(self) -> i64

source

pub fn relation_input(self) -> Option<Box<Relation>>

source

pub fn build_plan_root(self) -> Plan

Build the Spark spark::Plan for a Relation

source

pub fn plan_root(op_type: LogicalPlanBuilder) -> Plan

source

pub fn plan_cmd(command_type: CommandType) -> Plan

source

pub fn from(rel_type: RelType) -> LogicalPlanBuilder

Create a relation from an existing LogicalPlanBuilder this will add additional actions to the Relation

source

pub fn alias(self, alias: &str) -> LogicalPlanBuilder

source

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>> ) -> LogicalPlanBuilder
where T: ToVecExpr,

source

pub fn unpivot( self, ids: Vec<Expression>, values: Option<Vec<Expression>>, variable_column_name: &str, value_column_name: &str ) -> LogicalPlanBuilder

source

pub fn local_relation( batch: &RecordBatch ) -> Result<LogicalPlanBuilder, SparkError>

source

pub fn corr(self, col1: &str, col2: &str) -> LogicalPlanBuilder

source

pub fn cov(self, col1: &str, col2: &str) -> LogicalPlanBuilder

source

pub fn crosstab(self, col1: &str, col2: &str) -> LogicalPlanBuilder

source

pub fn describe<'a, I>(self, cols: Option<I>) -> LogicalPlanBuilder
where I: IntoIterator<Item = &'a str> + Default,

source

pub fn distinct(self) -> LogicalPlanBuilder

source

pub fn drop<T>(self, cols: T) -> LogicalPlanBuilder
where T: ToVecExpr,

source

pub fn drop_duplicates<'a, I>(self, cols: Option<I>) -> LogicalPlanBuilder
where I: IntoIterator<Item = &'a str> + Default,

source

pub fn dropna<'a, I>( self, how: &str, threshold: Option<i32>, subset: Option<I> ) -> LogicalPlanBuilder
where I: IntoIterator<Item = &'a str> + Default,

source

pub fn to_df<'a, I>(self, cols: I) -> LogicalPlanBuilder
where I: IntoIterator<Item = &'a str>,

source

pub fn exceptAll(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder

source

pub fn unionAll(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder

source

pub fn union(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder

source

pub fn unionByName( self, other: LogicalPlanBuilder, allow_missing_columns: Option<bool> ) -> LogicalPlanBuilder

source

pub fn substract(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder

source

pub fn intersect(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder

source

pub fn intersectAll(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder

source

pub fn filter<T>(self, condition: T) -> LogicalPlanBuilder
where T: ToFilterExpr,

source

pub fn freqItems<'a, I>( self, cols: I, support: Option<f64> ) -> LogicalPlanBuilder
where I: IntoIterator<Item = &'a str>,

source

pub fn hint<T>(self, name: &str, parameters: Option<T>) -> LogicalPlanBuilder
where T: ToVecExpr,

source

pub fn join<'a, T, I>( self, right: LogicalPlanBuilder, join_condition: Option<T>, join_type: JoinType, using_columns: I ) -> LogicalPlanBuilder
where T: ToExpr, I: IntoIterator<Item = &'a str>,

source

pub fn limit(self, limit: i32) -> LogicalPlanBuilder

source

pub fn offset(self, num: i32) -> LogicalPlanBuilder

source

pub fn repartition( self, num_partitions: u32, shuffle: Option<bool> ) -> LogicalPlanBuilder

source

pub fn sample( self, lower_bound: f64, upper_bound: f64, with_replacement: Option<bool>, seed: Option<i64> ) -> LogicalPlanBuilder

source

pub fn select<T>(self, cols: T) -> LogicalPlanBuilder
where T: ToVecExpr,

source

pub fn select_expr<'a, I>(self, cols: I) -> LogicalPlanBuilder
where I: IntoIterator<Item = &'a str>,

source

pub fn sort<I, T>(self, cols: I) -> LogicalPlanBuilder
where T: ToExpr, I: IntoIterator<Item = T>,

source

pub fn withColumn<T>(self, colName: &str, col: T) -> LogicalPlanBuilder
where T: ToExpr,

source

pub fn withColumns<I, K, T>(self, colMap: I) -> LogicalPlanBuilder
where T: ToExpr, K: ToString, I: IntoIterator<Item = (K, T)>,

source

pub fn withColumnsRenamed<I, K, V>(self, cols: I) -> LogicalPlanBuilder
where I: IntoIterator<Item = (K, V)>, K: AsRef<str>, V: AsRef<str>,

Trait Implementations§

source§

impl Clone for LogicalPlanBuilder

source§

fn clone(&self) -> LogicalPlanBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LogicalPlanBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromRef<T> for T
where T: Clone,

source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,