pub struct Union {
pub inputs: Vec<Arc<LogicalPlan>>,
pub schema: DFSchemaRef,
}Expand description
Union multiple inputs
Fields§
§inputs: Vec<Arc<LogicalPlan>>Inputs to merge
schema: DFSchemaRefUnion schema. Should be the same for all inputs.
Implementations§
Source§impl Union
impl Union
Sourcepub fn try_new(inputs: Vec<Arc<LogicalPlan>>) -> Result<Self>
pub fn try_new(inputs: Vec<Arc<LogicalPlan>>) -> Result<Self>
Constructs new Union instance deriving schema from inputs. Schema data types must match exactly.
Sourcepub fn try_new_with_loose_types(inputs: Vec<Arc<LogicalPlan>>) -> Result<Self>
pub fn try_new_with_loose_types(inputs: Vec<Arc<LogicalPlan>>) -> Result<Self>
Constructs new Union instance deriving schema from inputs. Infers common output types without inserting casts into the inputs. If a common type cannot be inferred, keeps the first input’s type so the analyzer can resolve or reject the inputs later.
Sourcepub fn try_new_by_name(inputs: Vec<Arc<LogicalPlan>>) -> Result<Self>
pub fn try_new_by_name(inputs: Vec<Arc<LogicalPlan>>) -> Result<Self>
Constructs a new Union instance that combines rows from different tables by name, instead of by position. This means that the specified inputs need not have schemas that are all the same width.
Like Self::try_new_with_loose_types, this infers common output types
without inserting casts. Missing columns contribute NULL at their input
position. For example, a missing Dictionary(Int32, Utf8) column and a
present one produce Utf8 in either input order.
Trait Implementations§
impl Eq for Union
Source§impl PartialOrd for Union
impl PartialOrd for Union
impl StructuralPartialEq for Union
Auto Trait Implementations§
impl !RefUnwindSafe for Union
impl !UnwindSafe for Union
impl Forget for Union
impl Freeze for Union
impl Move for Union
impl Send for Union
impl Sync for Union
impl Unpin for Union
impl UnsafeUnpin for Union
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more