From 1f6bdba90b2155360e3d56b14de0729cea3dc359 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Mon, 14 Sep 2026 17:13:59 -0400 Subject: [PATCH] Remove unnecessary slicing from RowFn execute_all_constant Signed-off-by: Robert Kruszewski --- .../unstable/row/batch/execute/constant.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/vortex-array/src/scalar_fn/unstable/row/batch/execute/constant.rs b/vortex-array/src/scalar_fn/unstable/row/batch/execute/constant.rs index 0cd60e821b6..bcc61068562 100644 --- a/vortex-array/src/scalar_fn/unstable/row/batch/execute/constant.rs +++ b/vortex-array/src/scalar_fn/unstable/row/batch/execute/constant.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use smallvec::SmallVec; use vortex_error::VortexResult; use super::super::RowFnExecutionArgs; @@ -18,14 +17,11 @@ impl RowFnExecutionArgs { kernel: impl Fn(BorrowedRowFnArgs<'_>, &mut ExecutionCtx) -> VortexResult, ctx: &mut ExecutionCtx, ) -> VortexResult { - let one_row: SmallVec<[ArrayRef; 4]> = self - .inputs - .iter() - .map(|input| input.slice(0..1)) - .collect::>()?; - - let result = - self.validate_kernel_output(kernel(self.execution_args(&one_row, 1), ctx)?, 1, ctx)?; + let result = self.validate_kernel_output( + kernel(self.execution_args(&self.inputs, 1), ctx)?, + 1, + ctx, + )?; let result = self.finalize_output(result, 1)?; let scalar = result.execute_scalar(0, ctx)?;