Commits

Andy Grove authored 7a05410296f
ARROW-10679: [Rust] [DataFusion] Implement CASE WHEN physical expression This PR implements the physical expression for the SQL CASE expression. The CASE expression is similar to a series of nested if/else and there are two forms that can be used. The first form consists of a series of boolean "when" expressions with corresponding "then" expressions and an optional "else" expression. ```sql CASE WHEN condition THEN result [WHEN ...] [ELSE result] END ``` The second form uses a base expression and then a series of "when" clauses that match on a literal value. ```sql CASE expression WHEN value THEN result [WHEN ...] [ELSE result] END ``` The implementation is quite simple/naive and I have not attempted to optimize this yet. I would prefer to get this plumbed through and tested with TPC-H before optimizing. Closes #8740 from andygrove/case-when Authored-by: Andy Grove <andygrove73@gmail.com> Signed-off-by: Andy Grove <andygrove73@gmail.com>