Rachelint commented on code in PR #12395:
URL: https://github.com/apache/datafusion/pull/12395#discussion_r1763753559
##########
datafusion/functions/src/string/ltrim.rs:
##########
@@ -81,7 +81,11 @@ impl ScalarUDFImpl for LtrimFunc {
}
fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> {
- utf8_to_str_type(&arg_types[0], "ltrim")
+ if arg_types[0] == DataType::Utf8View {
+ Ok(DataType::Utf8View)
Review Comment:
Fixed test, and introduced a benchamrk in #12513 .
https://github.com/apache/datafusion/pull/12395#issuecomment-2356681769
shows number about improvement.
The benchmark pr still need to be sorted out I will make it later today.
##########
datafusion/functions/src/string/ltrim.rs:
##########
@@ -81,7 +81,11 @@ impl ScalarUDFImpl for LtrimFunc {
}
fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> {
- utf8_to_str_type(&arg_types[0], "ltrim")
+ if arg_types[0] == DataType::Utf8View {
+ Ok(DataType::Utf8View)
Review Comment:
Fixed test, and introduced a benchamrk in #12513 .
https://github.com/apache/datafusion/pull/12395#issuecomment-2356681769
shows number about improvement.
The benchmark pr still need to be sorted out, I will make it later today.
--
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]