MCPcopy Create free account
hub / github.com/apache/datafusion / get_exprs_except_skipped

Function get_exprs_except_skipped

datafusion/expr/src/utils.rs:388–407  ·  view source on GitHub ↗

Returns all `Expr`s in the schema, except the `Column`s in the `columns_to_skip`

(
    schema: &DFSchema,
    columns_to_skip: &HashSet<Column>,
)

Source from the content-addressed store, hash-verified

386
387/// Returns all `Expr`s in the schema, except the `Column`s in the `columns_to_skip`
388fn get_exprs_except_skipped(
389 schema: &DFSchema,
390 columns_to_skip: &HashSet<Column>,
391) -> Vec<Expr> {
392 if columns_to_skip.is_empty() {
393 schema.iter().map(Expr::from).collect::<Vec<Expr>>()
394 } else {
395 schema
396 .columns()
397 .iter()
398 .filter_map(|c| {
399 if !columns_to_skip.contains(c) {
400 Some(Expr::Column(c.clone()))
401 } else {
402 None
403 }
404 })
405 .collect::<Vec<Expr>>()
406 }
407}
408
409/// When a JOIN has a USING clause, the join columns appear in the output
410/// schema once per side (for inner/outer joins) or once total (for semi/anti

Callers 2

expand_wildcardFunction · 0.85

Calls 7

columnsMethod · 0.80
ColumnClass · 0.50
is_emptyMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
containsMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…