Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/12646#discussion_r139027636
--- Diff:
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java ---
@@ -522,6 +537,41 @@ public UTF8String trimLeft() {
}
}
+ /**
+ * Based on the given trim string, trim this string starting from left
end
+ * This method searches each character in the source string starting
from the left 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 trimLeft(UTF8String trimString) {
+ if (trimString == null)
+ return null;
--- End diff --
Nit: the style issues. This should be one line
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]