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

Function find_window_expr

datafusion/sql/src/unparser/utils.rs:292–300  ·  view source on GitHub ↗
(
    windows: &'a [&'a Window],
    column_name: &'a str,
)

Source from the content-addressed store, hash-verified

290}
291
292fn find_window_expr<'a>(
293 windows: &'a [&'a Window],
294 column_name: &'a str,
295) -> Option<&'a Expr> {
296 windows
297 .iter()
298 .flat_map(|w| w.window_expr.iter())
299 .find(|expr| expr.schema_name().to_string() == column_name)
300}
301
302/// Transforms all Column expressions in a sort expression into the actual expression from aggregation or projection if found.
303/// This is required because if an ORDER BY expression is present in an Aggregate or Select, it is replaced

Callers 2

unproject_agg_exprsFunction · 0.85
unproject_window_exprsFunction · 0.85

Calls 3

iterMethod · 0.45
to_stringMethod · 0.45
schema_nameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…