[
https://issues.apache.org/jira/browse/METRON-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16085719#comment-16085719
]
ASF GitHub Bot commented on METRON-1038:
----------------------------------------
Github user ottobackwards commented on a diff in the pull request:
https://github.com/apache/metron/pull/650#discussion_r127220715
--- 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> {
--- End diff --
Why have this private? why not have stellar/common/util/math/*
> Stellar should have a better collection of basic math operations
> ----------------------------------------------------------------
>
> Key: METRON-1038
> URL: https://issues.apache.org/jira/browse/METRON-1038
> Project: Metron
> Issue Type: Improvement
> Reporter: Casey Stella
>
> At the moment the math functions are woefully incomplete.
> We should add at least the ones difficult or impossible to reconstruct using
> existing stellar primitives/math functions:
> * log10
> * log2
> * ln
> * sqrt
> * ceil
> * floor
> * sin
> * cos
> * tan
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)