Skip to content

Commit 15a0106

Browse files
committed
document LambdaParametersProgress
1 parent 9f19fed commit 15a0106

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

datafusion/expr/src/higher_order_function.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,21 @@ pub enum ValueOrLambda<V, L> {
287287
Lambda(L),
288288
}
289289

290-
/// The return of [HigherOrderUDF::lambda_parameters]
290+
/// Represents a step during the resolution of the parameters of all lambdas of a given
291+
/// higher-order function via [HigherOrderUDF::lambda_parameters]. It's valid that the
292+
/// fields of a given lambda changes between steps, and is up to the implementation to
293+
/// provide during the function evaluation the parameters that matches the fields returned
294+
/// at the [LambdaParametersProgress::Complete] step. See [HigherOrderUDF::lambda_parameters]
295+
/// docs for more details
291296
pub enum LambdaParametersProgress {
297+
/// The parameters of some lambdas are unknown due to a dependency on another lambda output field
298+
/// or are placeholders due to a dependency on it's own output field. It's perfectly valid to
299+
/// contain only `Some`'s and not a single `None`, representing lambdas that depends only on itself
300+
/// and not on others. [HigherOrderUDF::lambda_parameters] will be called again with the output
301+
/// field of all lambdas with known parameters.
292302
Partial(Vec<Option<Vec<FieldRef>>>),
303+
/// There are no unmet dependencies and all parameters are known, [HigherOrderUDF::lambda_parameters]
304+
/// will not be called again
293305
Complete(Vec<Vec<FieldRef>>),
294306
}
295307

0 commit comments

Comments
 (0)