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 2020/10/12 23:32:43 UTC

[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #6125: Make transform functions support underscore in the query functions

Jackie-Jiang commented on a change in pull request #6125:
URL: https://github.com/apache/incubator-pinot/pull/6125#discussion_r503583619



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/TransformFunctionFactory.java
##########
@@ -62,73 +63,73 @@ private TransformFunctionFactory() {
       new HashMap<String, Class<? extends TransformFunction>>() {
         {
           // NOTE: add all built-in transform functions here
-          put(TransformFunctionType.ADD.getName().toLowerCase(), AdditionTransformFunction.class);
-          put(TransformFunctionType.SUB.getName().toLowerCase(), SubtractionTransformFunction.class);
-          put(TransformFunctionType.MULT.getName().toLowerCase(), MultiplicationTransformFunction.class);
-          put(TransformFunctionType.DIV.getName().toLowerCase(), DivisionTransformFunction.class);
-          put(TransformFunctionType.MOD.getName().toLowerCase(), ModuloTransformFunction.class);
-
-          put(TransformFunctionType.PLUS.getName().toLowerCase(), AdditionTransformFunction.class);
-          put(TransformFunctionType.MINUS.getName().toLowerCase(), SubtractionTransformFunction.class);
-          put(TransformFunctionType.TIMES.getName().toLowerCase(), MultiplicationTransformFunction.class);
-          put(TransformFunctionType.DIVIDE.getName().toLowerCase(), DivisionTransformFunction.class);
-
-          put(TransformFunctionType.ABS.getName().toLowerCase(), AbsTransformFunction.class);
-          put(TransformFunctionType.CEIL.getName().toLowerCase(), CeilTransformFunction.class);
-          put(TransformFunctionType.EXP.getName().toLowerCase(), ExpTransformFunction.class);
-          put(TransformFunctionType.FLOOR.getName().toLowerCase(), FloorTransformFunction.class);
-          put(TransformFunctionType.LN.getName().toLowerCase(), LnTransformFunction.class);
-          put(TransformFunctionType.SQRT.getName().toLowerCase(), SqrtTransformFunction.class);
-
-          put(TransformFunctionType.CAST.getName().toLowerCase(), CastTransformFunction.class);
-          put(TransformFunctionType.JSONEXTRACTSCALAR.getName().toLowerCase(),
+          put(canonicalize(TransformFunctionType.ADD.getName().toLowerCase()), AdditionTransformFunction.class);

Review comment:
       You can remove the `toLowerCase()` here




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

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