Skip to content

Commit 1f6bdba

Browse files
committed
Remove unnecessary slicing from RowFn execute_all_constant
Signed-off-by: Robert Kruszewski <[email protected]>
1 parent 7286721 commit 1f6bdba

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

  • vortex-array/src/scalar_fn/unstable/row/batch/execute

‎vortex-array/src/scalar_fn/unstable/row/batch/execute/constant.rs‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
use smallvec::SmallVec;
54
use vortex_error::VortexResult;
65

76
use super::super::RowFnExecutionArgs;
@@ -18,14 +17,11 @@ impl RowFnExecutionArgs {
1817
kernel: impl Fn(BorrowedRowFnArgs<'_>, &mut ExecutionCtx) -> VortexResult<ArrayRef>,
1918
ctx: &mut ExecutionCtx,
2019
) -> VortexResult<ArrayRef> {
21-
let one_row: SmallVec<[ArrayRef; 4]> = self
22-
.inputs
23-
.iter()
24-
.map(|input| input.slice(0..1))
25-
.collect::<VortexResult<_>>()?;
26-
27-
let result =
28-
self.validate_kernel_output(kernel(self.execution_args(&one_row, 1), ctx)?, 1, ctx)?;
20+
let result = self.validate_kernel_output(
21+
kernel(self.execution_args(&self.inputs, 1), ctx)?,
22+
1,
23+
ctx,
24+
)?;
2925
let result = self.finalize_output(result, 1)?;
3026
let scalar = result.execute_scalar(0, ctx)?;
3127

0 commit comments

Comments
 (0)