diff --git a/datafusion/physical-expr/src/string_expressions.rs b/datafusion/physical-expr/src/string_expressions.rs index 406fa120e86c..7d9fecf61407 100644 --- a/datafusion/physical-expr/src/string_expressions.rs +++ b/datafusion/physical-expr/src/string_expressions.rs @@ -373,19 +373,19 @@ fn general_trim( } } -/// Removes the longest string containing only characters in characters (a space by default) from the start and end of string. +/// Returns the longest string with leading and trailing characters removed. If the characters are not specified, whitespace is removed. /// btrim('xyxtrimyyx', 'xyz') = 'trim' pub fn btrim(args: &[ArrayRef]) -> Result { general_trim::(args, TrimType::Both) } -/// Removes the longest string containing only characters in characters (a space by default) from the start of string. +/// Returns the longest string with leading characters removed. If the characters are not specified, whitespace is removed. /// ltrim('zzzytest', 'xyz') = 'test' pub fn ltrim(args: &[ArrayRef]) -> Result { general_trim::(args, TrimType::Left) } -/// Removes the longest string containing only characters in characters (a space by default) from the end of string. +/// Returns the longest string with trailing characters removed. If the characters are not specified, whitespace is removed. /// rtrim('testxxzx', 'xyz') = 'test' pub fn rtrim(args: &[ArrayRef]) -> Result { general_trim::(args, TrimType::Right)