Skip to content

Apache DataFusion SQL Query Engine

Minor: doc how field name is to be set (#12757)

jcsherin6f8c74ca873f
diff --git a/datafusion/expr/src/udwf.rs b/datafusion/expr/src/udwf.rs
index 6459e8f3f7..69f357d48f 100644
--- a/datafusion/expr/src/udwf.rs
+++ b/datafusion/expr/src/udwf.rs
@@ -355,6 +355,10 @@ pub trait WindowUDFImpl: Debug + Send + Sync {
}
/// The [`Field`] of the final result of evaluating this window function.
+ ///
+ /// Call `field_args.name()` to get the fully qualified name for defining
+ /// the [`Field`]. For a complete example see the implementation in the
+ /// [Basic Example](WindowUDFImpl#basic-example) section.
fn field(&self, field_args: WindowUDFFieldArgs) -> Result<Field>;
/// Allows the window UDF to define a custom result ordering.