Simply the `concat_ws` function by 1. folding to `null` if the delimiter is null 2. filtering out `null` arguments 3. using `concat` to replace `concat_ws` if the delimiter is an empty string 4. concatenating contiguous literals if the delimiter is a literal.
(
&self,
args: Vec<Expr>,
_info: &SimplifyContext,
)
| 383 | /// 3. using `concat` to replace `concat_ws` if the delimiter is an empty string |
| 384 | /// 4. concatenating contiguous literals if the delimiter is a literal. |
| 385 | fn simplify( |
| 386 | &self, |
| 387 | args: Vec<Expr>, |
| 388 | _info: &SimplifyContext, |
| 389 | ) -> Result<ExprSimplifyResult> { |
| 390 | match &args[..] { |
| 391 | [delimiter, vals @ ..] => simplify_concat_ws(delimiter, vals), |
| 392 | _ => Ok(ExprSimplifyResult::Original(args)), |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | fn documentation(&self) -> Option<&Documentation> { |
| 397 | self.doc() |
nothing calls this directly
no test coverage detected