@@ -25,6 +25,7 @@ use common_expression::types::NumberType;
25
25
use common_expression:: types:: StringType ;
26
26
use common_expression:: vectorize_with_builder_1_arg;
27
27
use common_expression:: vectorize_with_builder_2_arg;
28
+ use common_expression:: vectorize_with_builder_4_arg;
28
29
use common_expression:: FunctionProperty ;
29
30
use common_expression:: FunctionRegistry ;
30
31
use common_expression:: Value ;
@@ -135,11 +136,12 @@ pub fn register(registry: &mut FunctionRegistry) {
135
136
} ,
136
137
) ;
137
138
138
- registry. register_4_arg :: < StringType , NumberType < i64 > , NumberType < i64 > , StringType , StringType , _ , _ > (
139
+ registry. register_passthrough_nullable_4_arg :: < StringType , NumberType < i64 > , NumberType < i64 > , StringType , StringType , _ , _ > (
139
140
"insert" ,
140
141
FunctionProperty :: default ( ) ,
141
142
|_, _, _, _| None ,
142
- |srcstr, pos, len, substr| {
143
+ vectorize_with_builder_4_arg :: < StringType , NumberType < i64 > , NumberType < i64 > , StringType , StringType > (
144
+ |srcstr, pos, len, substr, builder| {
143
145
let mut values: Vec < u8 > = vec ! [ ] ;
144
146
145
147
let sl = srcstr. len ( ) as i64 ;
@@ -154,8 +156,10 @@ pub fn register(registry: &mut FunctionRegistry) {
154
156
values. extend_from_slice ( & srcstr[ p + l..] ) ;
155
157
}
156
158
}
157
- values
158
- }
159
+ builder. put_slice ( & values) ;
160
+ builder. commit_row ( ) ;
161
+ Ok ( ( ) )
162
+ } ) ,
159
163
) ;
160
164
161
165
registry. register_3_arg :: < StringType , NumberType < u64 > , StringType , StringType , _ , _ > (
0 commit comments