Struct 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: ToVecExpr>( input: LogicalPlanBuilder, group_type: GroupType, grouping_cols: Vec<Expression>, agg_expression: T, pivot_col: Option<Expression>, pivot_vals: Option<Vec<Literal>>, ) -> LogicalPlanBuilder

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: ToVecExpr>(self, cols: T) -> LogicalPlanBuilder

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 except_all(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder

Source

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

Source

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

Source

pub fn union_by_name( 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 intersect_all(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder

Source

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

Source

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

Source

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

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: ToVecExpr>(self, cols: T) -> LogicalPlanBuilder

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 with_column<T: ToExpr>( self, col_name: &str, col: T, ) -> LogicalPlanBuilder

Source

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

Source

pub fn with_columns_renamed<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

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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,

Source§

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>,

Source§

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>,

Source§

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,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T