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 select<T: ToVecExpr>(&mut self, cols: T) -> LogicalPlanBuilder
pub fn select_expr(&mut self, cols: Vec<&str>) -> LogicalPlanBuilder
pub fn filter<T: ToFilterExpr>(&mut self, condition: T) -> LogicalPlanBuilder
pub fn contains(&mut self, condition: Column) -> LogicalPlanBuilder
pub fn limit(&mut self, limit: i32) -> LogicalPlanBuilder
pub fn drop_duplicates(&mut self, cols: Option<Vec<&str>>) -> LogicalPlanBuilder
pub fn with_columns_renamed( &mut self, cols: HashMap<String, String> ) -> LogicalPlanBuilder
pub fn drop(&mut self, cols: Vec<String>) -> LogicalPlanBuilder
pub fn sample( &mut self, lower_bound: f64, upper_bound: f64, with_replacement: Option<bool>, seed: Option<i64> ) -> LogicalPlanBuilder
pub fn repartition( &mut self, num_partitions: i32, shuffle: Option<bool> ) -> LogicalPlanBuilder
pub fn offset(&mut self, num: i32) -> LogicalPlanBuilder
pub fn sort(&mut self, cols: Vec<Column>) -> 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 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