Skip to content

Commit 9124d37

Browse files
committed
Update EvalMethod::ExpressionOrExpression docstring
1 parent 0d64069 commit 9124d37

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • datafusion/physical-expr/src/expressions

datafusion/physical-expr/src/expressions/case.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,21 @@ enum EvalMethod {
6565
/// for expressions that are infallible and can be cheaply computed for the entire
6666
/// record batch rather than just for the rows where the predicate is true.
6767
///
68-
/// CASE WHEN condition THEN column [ELSE NULL] END
68+
/// CASE WHEN condition THEN infallible_expression [ELSE NULL] END
6969
InfallibleExprOrNull,
7070
/// This is a specialization for a specific use case where we can take a fast path
7171
/// if there is just one when/then pair and both the `then` and `else` expressions
7272
/// are literal values
7373
/// CASE WHEN condition THEN literal ELSE literal END
7474
ScalarOrScalar,
7575
/// This is a specialization for a specific use case where we can take a fast path
76-
/// if there is just one when/then pair and both the `then` and `else` are expressions
76+
/// if there is just one when/then pair, the `then` is an expression, and `else` is either
77+
/// an expression, literal NULL or absent.
7778
///
78-
/// CASE WHEN condition THEN expression ELSE expression END
79+
/// In contrast to [`EvalMethod::InfallibleExprOrNull`], this specialization can handle fallible
80+
/// `then` expressions.
81+
///
82+
/// CASE WHEN condition THEN expression [ELSE expression] END
7983
ExpressionOrExpression(ProjectedCaseBody),
8084

8185
/// This is a specialization for [`EvalMethod::WithExpression`] when the value and results are literals

0 commit comments

Comments
 (0)