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



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/SingleParamMathTransformFunction.java
##########
@@ -161,4 +161,55 @@ protected void applyMathOperator(double[] values, int 
length) {
       }
     }
   }
+
+  public static class Log2TransformFunction extends 
SingleParamMathTransformFunction {
+    public static final String FUNCTION_NAME = "log2";
+
+    @Override
+    public String getName() {
+      return FUNCTION_NAME;
+    }
+
+    @Override
+    protected void applyMathOperator(double[] values, int length) {
+      for (int i = 0; i < length; i++) {
+        _results[i] = Math.log(values[i]) / Math.log(2);
+      }
+      ;
+    }
+  }
+
+  public static class Log10TransformFunction extends 
SingleParamMathTransformFunction {
+    public static final String FUNCTION_NAME = "log10";
+
+    @Override
+    public String getName() {
+      return FUNCTION_NAME;
+    }
+
+    @Override
+    protected void applyMathOperator(double[] values, int length) {
+      for (int i = 0; i < length; i++) {
+        _results[i] = Math.log10(values[i]);
+      }
+      ;

Review comment:
       wow. I guess intelliJ shortcuts with codestyle is definitely messing 
these up. I will refrain using those from now on.




-- 
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