Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/metron/pull/650#discussion_r127245372
  
    --- Diff: 
metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/dsl/functions/MathFunctions.java
 ---
    @@ -25,17 +25,39 @@
     import org.apache.metron.stellar.dsl.StellarFunction;
     
     import java.util.List;
    +import java.util.function.Function;
     
     public class MathFunctions {
     
    -  @Stellar(name="ABS"
    -          ,description="Returns the absolute value of a number."
    -          ,params = {
    -                "number - The number to take the absolute value of"
    -                    }
    -          , returns="The absolute value of the number passed in."
    -          )
    -  public static class Abs implements StellarFunction {
    +  private enum SingleArgMathFunctions implements Function<Double, Double> {
    +    ABS(d -> Math.abs(d)),
    +    CEIL(d -> Math.ceil(d)),
    +    COS(d -> Math.cos(d)),
    +    FLOOR(d -> Math.floor(d)),
    +    LOG10(d -> Math.log10(d)),
    +    LOG2(d -> Math.log(d)/Math.log(2)),
    +    LN(d -> Math.log(d)),
    +    SIN(d -> Math.sin(d)),
    +    SQRT(d -> Math.sqrt(d)),
    +    TAN(d -> Math.tan(d)),
    +    ;
    +
    --- End diff --
    
    I agree.  I think that in general when we are adapting or exposing a set of 
functionality  from java or from apache-commons  we should state our intent 
explicitly for the record.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to