Skip to content

Commit 6dcee76

Browse files
committed
Adding support for url encoding/decoding
1 parent def6db1 commit 6dcee76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pinot-common/src/main/java/org/apache/pinot/common/function/scalar/StringFunctions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ public static int strcmp(String input1, String input2) {
456456
@ScalarFunction
457457
public static String encodeUrl(String input)
458458
throws UnsupportedEncodingException {
459-
return URLEncoder.encode(input, StandardCharsets.UTF_8);
459+
return URLEncoder.encode(input, StandardCharsets.UTF_8.toString());
460460
}
461461

462462
/**
@@ -468,6 +468,6 @@ public static String encodeUrl(String input)
468468
@ScalarFunction
469469
public static String decodeUrl(String input)
470470
throws UnsupportedEncodingException {
471-
return URLDecoder.decode(input, StandardCharsets.UTF_8);
471+
return URLDecoder.decode(input, StandardCharsets.UTF_8.toString());
472472
}
473473
}

0 commit comments

Comments
 (0)