kosiew commented on PR #22275:
URL: https://github.com/apache/datafusion/pull/22275#issuecomment-4498092376
@nvphungdev
Thanks for working on this.
#22357 makes the implementation clearer and more efficient:
```rust
if from.is_empty() {
builder.append_value(string);
return;
}
```
That directly expresses the new behavior: empty `from` means “return the
original string unchanged.”
This PR still uses `append_with` and loops over `string.chars()`, which is
unnecessary work and looks like leftover logic from the old behavior. It is
correct, but less idiomatic.
#22357 also has better sqllogictest coverage because it tests all three
string variants:
* regular Utf8
* Utf8View
* LargeUtf8
This has more Rust unit tests, but the implementation is weaker.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]