refactor: use register_passthrough_nullable_1_arg and vectorize_string_to_string
@@ -50,10 +50,12 @@ pub fn register(registry: &mut FunctionRegistry) {
);
registry.register_aliases("upper", &["ucase"]);
- registry.register_with_writer_1_arg::<StringType, StringType, _, _>(
+ registry.register_passthrough_nullable_1_arg::<StringType, StringType, _, _>(
"lower",
FunctionProperty::default(),
|_| None,
+ vectorize_string_to_string(
+ |_| 0,
|val, writer| {
for (start, end, ch) in val.char_indices() {
if ch == '\u{FFFD}' {
@@ -70,6 +72,7 @@ pub fn register(registry: &mut FunctionRegistry) {
writer.commit_row();
Ok(())
},
+ ),
);
registry.register_aliases("lower", &["lcase"]);
