Enum JoinType

Source
pub enum JoinType {
    Inner,
    Left,
    Right,
    Full,
    LeftSemi,
    RightSemi,
    LeftAnti,
    RightAnti,
    LeftMark,
}
Expand description

Join type

Variants§

§

Inner

Inner Join - Returns only rows where there is a matching value in both tables based on the join condition. For example, if joining table A and B on A.id = B.id, only rows where A.id equals B.id will be included. All columns from both tables are returned for the matching rows. Non-matching rows are excluded entirely.

§

Left

Left Join - Returns all rows from the left table and matching rows from the right table. If no match, NULL values are returned for columns from the right table.

§

Right

Right Join - Returns all rows from the right table and matching rows from the left table. If no match, NULL values are returned for columns from the left table.

§

Full

Full Join (also called Full Outer Join) - Returns all rows from both tables, matching rows where possible. When a row from either table has no match in the other table, the missing columns are filled with NULL values. For example, if table A has row X with no match in table B, the result will contain row X with NULL values for all of table B’s columns. This join type preserves all records from both tables, making it useful when you need to see all data regardless of matches.

§

LeftSemi

Left Semi Join - Returns rows from the left table that have matching rows in the right table. Only columns from the left table are returned.

§

RightSemi

Right Semi Join - Returns rows from the right table that have matching rows in the left table. Only columns from the right table are returned.

§

LeftAnti

Left Anti Join - Returns rows from the left table that do not have a matching row in the right table.

§

RightAnti

Right Anti Join - Returns rows from the right table that do not have a matching row in the left table.

§

LeftMark

Left Mark join

Returns one record for each record from the left input. The output contains an additional column “mark” which is true if there is at least one match in the right input where the join condition evaluates to true. Otherwise, the mark column is false. For more details see 1. This join type is used to decorrelate EXISTS subqueries used inside disjunctive predicates.

Note: This we currently do not implement the full null semantics for the mark join described in 1 which will be needed if we and ANY subqueries. In our version the mark column will only be true for had a match and false when no match was found, never null.

Implementations§

Source§

impl JoinType

Source

pub fn is_outer(self) -> bool

Source

pub fn swap(&self) -> JoinType

Returns the JoinType if the (2) inputs were swapped

Panics if Self::supports_swap returns false

Source

pub fn supports_swap(&self) -> bool

Does the join type support swapping inputs?

Trait Implementations§

Source§

impl Clone for JoinType

Source§

fn clone(&self) -> JoinType

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 JoinType

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for JoinType

Source§

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

Formats the value using the given formatter. Read more
Source§

impl FromStr for JoinType

Source§

type Err = DataFusionError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<JoinType, DataFusionError>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for JoinType

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for JoinType

Source§

fn eq(&self, other: &JoinType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for JoinType

Source§

fn partial_cmp(&self, other: &JoinType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for JoinType

Source§

impl Eq for JoinType

Source§

impl StructuralPartialEq for JoinType

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> DynEq for T
where T: Eq + Any,

Source§

fn dyn_eq(&self, other: &(dyn Any + 'static)) -> bool

Source§

impl<T> DynHash for T
where T: Hash + Any,

Source§

fn dyn_hash(&self, state: &mut dyn Hasher)

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,