jasperjiaguo commented on a change in pull request #8378:
URL: https://github.com/apache/pinot/pull/8378#discussion_r832506905
##########
File path:
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/StringFunctions.java
##########
@@ -443,4 +446,28 @@ public static boolean contains(String input, String
substring) {
public static int strcmp(String input1, String input2) {
return input1.compareTo(input2);
}
+
+ /**
+ *
+ * @param input plaintext string
+ * @return url encoded string
+ * @throws UnsupportedEncodingException
+ */
+ @ScalarFunction
+ public static String encodeUrl(String input)
+ throws UnsupportedEncodingException {
+ return URLEncoder.encode(input, StandardCharsets.UTF_8.toString());
Review comment:
The java8 compilation will fail if we don't add `.toString()`
https://github.com/apache/pinot/runs/5632328340?check_suite_focus=true
--
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]