Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/12646#discussion_r139032875
--- Diff:
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java ---
@@ -535,6 +585,51 @@ public UTF8String trimRight() {
}
}
+ /**
+ * Based on the given trim string, trim this string starting from right
end
+ * This method searches each character in the source string starting
from the right end, removes the character if it
+ * is in the trim string, stops at the first character which is not in
the trim string, returns the new string.
+ * @param trimString the trim character string
+ */
+ public UTF8String trimRight(UTF8String trimString) {
+ if (trimString == null)
+ return null;
--- End diff --
one line
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]