You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/03/17 10:20:12 UTC

[GitHub] [pinot] mneedham commented on a change in pull request #8304: Add commonly used math, string and date scalar functions in Pinot

mneedham commented on a change in pull request #8304:
URL: https://github.com/apache/pinot/pull/8304#discussion_r828963670



##########
File path: pinot-common/src/main/java/org/apache/pinot/common/function/scalar/ArithmeticFunctions.java
##########
@@ -104,4 +111,30 @@ public static double ln(double a) {
   public static double sqrt(double a) {
     return Math.sqrt(a);
   }
+
+  @ScalarFunction
+  public static double sign(double a) {
+    return Math.signum(a);
+  }
+
+  @ScalarFunction
+  public static double pi() { return Math.PI; }
+
+  @ScalarFunction
+  public static double e() { return Math.E; }
+
+  @ScalarFunction
+  public static double power(double a, double b) {
+    return Math.pow(a, b);
+  }
+
+  @ScalarFunction
+  public static double log(double a) {
+    return Math.log10(a);
+  }

Review comment:
       @Jackie-Jiang if you have the same function as a scalar function and transform function, how does Pinot decide which one to use? Or would they need to have different names?




-- 
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-unsubscribe@pinot.apache.org

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



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