xiangfu0 commented on code in PR #14435:
URL: https://github.com/apache/pinot/pull/14435#discussion_r1841184841


##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/DataTypeConversionFunctions.java:
##########
@@ -129,4 +129,27 @@ public static byte[] base64Encode(byte[] input) {
   public static byte[] base64Decode(byte[] input) {
     return Base64.getDecoder().decode(input);
   }
+
+  /**
+   * Converts a hex string to the corresponded long value.
+   * @param input hex decimal string
+   * @return decoded long value
+   */
+  @ScalarFunction
+  public static long hexDecimalToLong(String input) {
+    if (input.startsWith("0x")) {
+      input = input.substring(2);
+    }
+    return Long.parseLong(input, 16);

Review Comment:
   👍  updated the PR



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to