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

Function case

datafusion/expr/src/expr_fn.rs:380–382  ·  view source on GitHub ↗

Create a CASE WHEN statement with literal WHEN expressions for comparison to the base expression.

(expr: Expr)

Source from the content-addressed store, hash-verified

378
379/// Create a CASE WHEN statement with literal WHEN expressions for comparison to the base expression.
380pub fn case(expr: Expr) -> CaseBuilder {
381 CaseBuilder::new(Some(Box::new(expr)), vec![], vec![], None)
382}
383
384/// Create a CASE WHEN statement with boolean WHEN expressions and no base expression.
385pub fn when(when: Expr, then: Expr) -> CaseBuilder {

Callers 3

format_case_whenFunction · 0.70
plan_pivotFunction · 0.50
describeMethod · 0.50

Calls 1

newFunction · 0.85

Tested by 1

format_case_whenFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…