From 7b790a6fe84995c59104fc8175d9687d65ced543 Mon Sep 17 00:00:00 2001 From: Jiangzhou He Date: Sat, 5 Jul 2025 17:30:27 -0700 Subject: [PATCH] fix(split): output transformed char offset for range --- src/ops/functions/split_recursively.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/ops/functions/split_recursively.rs b/src/ops/functions/split_recursively.rs index 7059df65d..21060563b 100644 --- a/src/ops/functions/split_recursively.rs +++ b/src/ops/functions/split_recursively.rs @@ -918,16 +918,14 @@ impl SimpleFunctionExecutor for Executor { let table = output .into_iter() .map(|chunk_output| { + let output_start = chunk_output.start_pos.output.unwrap(); + let output_end = chunk_output.end_pos.output.unwrap(); ( - RangeValue::new( - chunk_output.start_pos.byte_offset, - chunk_output.end_pos.byte_offset, - ) - .into(), + RangeValue::new(output_start.char_offset, output_end.char_offset).into(), fields_value!( Arc::::from(chunk_output.text), - chunk_output.start_pos.output.unwrap().into_output(), - chunk_output.end_pos.output.unwrap().into_output() + output_start.into_output(), + output_end.into_output() ) .into(), )