Skip to content

Commit b984129

Browse files
committed
Update doc, add note for devs
1 parent 3041e90 commit b984129

File tree

1 file changed

+7
-0
lines changed
  • datafusion/physical-expr-common/src

1 file changed

+7
-0
lines changed

datafusion/physical-expr-common/src/utils.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ pub fn scatter(mask: &BooleanArray, truthy: &dyn Array) -> Result<ArrayRef> {
9393
}
9494

9595
/// Evaluates expressions against a record batch.
96+
/// This will convert the resulting ColumnarValues to ArrayRefs,
97+
/// duplicating any ScalarValues that may have been returned.
98+
/// This function does not perform any checks that the resulting arrays
99+
/// have the same length as the record batch.
100+
// NOTE: This means that this should not be called on expressions that may return
101+
// arrays of different lengths (e.g. filtering/flattening etc).
102+
// Also, consider avoiding this if your code can use optimizations for ScalarValues.
96103
#[inline]
97104
pub fn evaluate_expressions_to_arrays(
98105
exprs: &[Arc<dyn PhysicalExpr>],

0 commit comments

Comments
 (0)