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 plan_root(self) -> Plan
pub fn plan_root(self) -> Plan
Build the Spark spark::Plan for a Relation
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 alias(self, alias: &str) -> LogicalPlanBuilder
pub fn alias(self, alias: &str) -> LogicalPlanBuilder
Create a relation from an existing LogicalPlanBuilder this will add additional actions to the Relation
pub fn aggregate<I, S>( input: LogicalPlanBuilder, group_type: GroupType, grouping_cols: Vec<Expression>, agg_expression: I, pivot_col: Option<Expression>, pivot_vals: Option<Vec<Literal>>, ) -> LogicalPlanBuilder
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: impl AsRef<str>, col2: impl AsRef<str>, ) -> LogicalPlanBuilder
pub fn cov( self, col1: impl AsRef<str>, col2: impl AsRef<str>, ) -> LogicalPlanBuilder
pub fn crosstab(self, col1: &str, col2: &str) -> LogicalPlanBuilder
pub fn describe<I, T>(self, cols: Option<I>) -> LogicalPlanBuilder
pub fn distinct(self) -> LogicalPlanBuilder
pub fn drop<I, S>(self, cols: I) -> LogicalPlanBuilder
pub fn drop_duplicates<I, T>( self, cols: Option<I>, within_watermark: bool, ) -> LogicalPlanBuilder
pub fn dropna<I, T>( self, how: &str, threshold: Option<i32>, subset: Option<I>, ) -> LogicalPlanBuilder
pub fn fillna<I, T, L>(self, cols: Option<I>, values: T) -> LogicalPlanBuilder
pub fn to_df<I>(self, cols: I) -> LogicalPlanBuilder
pub fn except_all(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn union_all(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn union(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn union_by_name( 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 intersect_all(self, other: LogicalPlanBuilder) -> LogicalPlanBuilder
pub fn filter<T: ToFilterExpr>(self, condition: T) -> LogicalPlanBuilder
pub fn approx_quantile<I, P>( self, cols: I, probabilities: P, relative_error: f64, ) -> LogicalPlanBuilder
pub fn freq_items<I, S>( self, cols: I, support: Option<f64>, ) -> LogicalPlanBuilder
pub fn hint<I, S>(self, name: &str, parameters: Option<I>) -> LogicalPlanBuilder
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 project<I, S>(self, cols: I) -> LogicalPlanBuilder
pub fn repartition( self, num_partitions: u32, shuffle: Option<bool>, ) -> LogicalPlanBuilder
pub fn repartition_by_range<I, S>( self, num_partitions: Option<i32>, cols: I, ) -> LogicalPlanBuilder
pub fn replace<I, T, L>( self, to_replace: T, value: T, subset: Option<I>, ) -> LogicalPlanBuilder
pub fn sample( self, lower_bound: f64, upper_bound: f64, with_replacement: Option<bool>, seed: Option<i64>, deterministic_order: bool, ) -> LogicalPlanBuilder
pub fn sample_by<K, I, T>( self, col: T, fractions: I, seed: i64, ) -> LogicalPlanBuilder
pub fn select_expr<I>(self, cols: I) -> LogicalPlanBuilder
pub fn sort<I, T>(self, cols: I, is_global: bool) -> LogicalPlanBuilder
pub fn summary<T, I>(self, statistics: Option<I>) -> LogicalPlanBuilder
pub fn with_column(self, col_name: &str, col: Column) -> LogicalPlanBuilder
pub fn with_columns<K, I, N, M>( self, col_map: I, metadata: Option<M>, ) -> LogicalPlanBuilder
pub fn with_columns_renamed<I, K, V>(self, cols: I) -> LogicalPlanBuilder
pub fn with_watermark<T, D>( self, event_time: T, delay_threshold: D, ) -> 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 moreSource§impl Debug for LogicalPlanBuilder
impl Debug for LogicalPlanBuilder
Source§impl From<RelType> for LogicalPlanBuilder
impl From<RelType> for LogicalPlanBuilder
Source§fn from(rel_type: RelType) -> LogicalPlanBuilder
fn from(rel_type: RelType) -> LogicalPlanBuilder
Converts to this type from the input type.
Auto 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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