Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all equality predicates in equality join #4193

Merged
merged 12 commits into from
Nov 17, 2022
12 changes: 12 additions & 0 deletions datafusion/expr/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,18 @@ pub fn can_hash(data_type: &DataType) -> bool {
}
}

/// Check whether all columns are from the schema.
pub fn check_all_column_from_schema(
columns: &HashSet<Column>,
schema: DFSchemaRef,
) -> Result<bool> {
let result = columns
.iter()
.all(|column| schema.index_of_column(column).is_ok());

Ok(result)
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
Loading