MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / fmt

Method fmt

src/expr/src/relation/func.rs:3248–3331  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter)

Source from the content-addressed store, hash-verified

3246 M: HumanizerMode,
3247{
3248 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3249 use AggregateFunc::*;
3250 let name = self.expr.name();
3251 match self.expr {
3252 JsonbAgg { order_by }
3253 | JsonbObjectAgg { order_by }
3254 | MapAgg { order_by, .. }
3255 | ArrayConcat { order_by }
3256 | ListConcat { order_by }
3257 | StringAgg { order_by }
3258 | RowNumber { order_by }
3259 | Rank { order_by }
3260 | DenseRank { order_by } => {
3261 let order_by = order_by.iter().map(|col| self.child(col));
3262 write!(f, "{}[order_by=[{}]]", name, separated(", ", order_by))
3263 }
3264 LagLead {
3265 lag_lead: _,
3266 ignore_nulls,
3267 order_by,
3268 } => {
3269 let order_by = order_by.iter().map(|col| self.child(col));
3270 f.write_str(name)?;
3271 f.write_str("[")?;
3272 if *ignore_nulls {
3273 f.write_str("ignore_nulls=true, ")?;
3274 }
3275 write!(f, "order_by=[{}]", separated(", ", order_by))?;
3276 f.write_str("]")
3277 }
3278 FirstValue {
3279 order_by,
3280 window_frame,
3281 } => {
3282 let order_by = order_by.iter().map(|col| self.child(col));
3283 f.write_str(name)?;
3284 f.write_str("[")?;
3285 write!(f, "order_by=[{}]", separated(", ", order_by))?;
3286 if *window_frame != WindowFrame::default() {
3287 write!(f, " {}", window_frame)?;
3288 }
3289 f.write_str("]")
3290 }
3291 LastValue {
3292 order_by,
3293 window_frame,
3294 } => {
3295 let order_by = order_by.iter().map(|col| self.child(col));
3296 f.write_str(name)?;
3297 f.write_str("[")?;
3298 write!(f, "order_by=[{}]", separated(", ", order_by))?;
3299 if *window_frame != WindowFrame::default() {
3300 write!(f, " {}", window_frame)?;
3301 }
3302 f.write_str("]")
3303 }
3304 WindowAggregate {
3305 wrapped_aggregate,

Callers

nothing calls this directly

Calls 7

childMethod · 0.80
separatedFunction · 0.50
nameMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
write_strMethod · 0.45
derefMethod · 0.45

Tested by

no test coverage detected