Function
fmt_function
(
f: &mut Formatter,
fun: &str,
distinct: bool,
args: &[Expr],
display: bool,
)
Source from the content-addressed store, hash-verified
| 3723 | } |
| 3724 | |
| 3725 | fn fmt_function( |
| 3726 | f: &mut Formatter, |
| 3727 | fun: &str, |
| 3728 | distinct: bool, |
| 3729 | args: &[Expr], |
| 3730 | display: bool, |
| 3731 | ) -> fmt::Result { |
| 3732 | let args: Vec<String> = match display { |
| 3733 | true => args.iter().map(|arg| format!("{arg}")).collect(), |
| 3734 | false => args.iter().map(|arg| format!("{arg:?}")).collect(), |
| 3735 | }; |
| 3736 | |
| 3737 | let distinct_str = match distinct { |
| 3738 | true => "DISTINCT ", |
| 3739 | false => "", |
| 3740 | }; |
| 3741 | write!(f, "{}({}{})", fun, distinct_str, args.join(", ")) |
| 3742 | } |
| 3743 | |
| 3744 | /// The name of the column (field) that this `Expr` will produce in the physical plan. |
| 3745 | /// The difference from [Expr::schema_name] is that top-level columns are unqualified. |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…