Function datafusion_expr::utils::find_valid_equijoin_key_pair

source ยท
pub fn find_valid_equijoin_key_pair(
    left_key: &Expr,
    right_key: &Expr,
    left_schema: &DFSchema,
    right_schema: &DFSchema,
) -> Result<Option<(Expr, Expr)>>
Expand description

Give two sides of the equijoin predicate, return a valid join key pair. If there is no valid join key pair, return None.

A valid join means:

  1. All referenced column of the left side is from the left schema, and all referenced column of the right side is from the right schema.
  2. Or opposite. All referenced column of the left side is from the right schema, and the right side is from the left schema.