You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metron.apache.org by cestella <gi...@git.apache.org> on 2016/12/23 21:57:46 UTC

[GitHub] incubator-metron issue #404: METRON-624: Updated Comparison/Equality Evaluat...

Github user cestella commented on the issue:

    https://github.com/apache/incubator-metron/pull/404
  
    Hey, thanks for the great addition @jjmeyer0!
    
    A few things to note and some context.
    
    Around validation, the initial stellar implementation purposefully ran validation the way that it's implemented, but we can reconsider those things if we want.
    * The variables resolve to `null` to ensure that functions could handle `null` without error.  I understand that Java and most programming languages would NPE on `1 < null`, but our data flowing through the topologies will be sparse, so not all variables will be defined for every message.  If a stellar statement is applied to a message where the variable is not defined, I wanted to ensure that it did not fail, but rather did an appropriate thing depending on the operation.
    * We do function resolution during validation to ensure people have not made a syntactic error in their stellar statements when pushing configs to zookeeper.  We would rather fail fast here.
    
    Around `==` for floating point numbers.  The initial stellar implementation intended to do an epsilon check on equals involving doubles (e.g. Math.abs(lhs - rhs) < epsilon) as you almost never want strict equality in floating point numbers.
    
    What this does show is that we need more of a rigorous spec and more time spent on documenting the design of Stellar.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---