Github user ottobackwards commented on the issue:

    https://github.com/apache/incubator-metron/pull/293
  
    OK I have it in.  Here is the thing that I found,  I know there is a pull 
about fixing IS_EMPTY from throwing exceptions - and I had to take that same 
return 0 approach instead of throwing.  IS_EMPTY did NOT have a test in 
StellarTests, so it was never being tested through the stellar variable 
resolver, validation, parser etc.  If it had had a test there ( using the run() 
as implemented in the test ) it never would have been committed, because it 
NEVER works, no matter what you pass it as originally implemented with the 
IllegalStateExceptions.  This is because the validate calls down to the apply 
with a specifically null argument which triggers the exception.
    So, a couple of things:
    
    - every stellar function needs to be tested through the whole stellar 
framework and not just on top of StellarFunction.apply()
    - why would validate call parse which calls apply?  Is that the way it is 
at runtime?  Does apply always get called twice?  Is the test harness wrong?


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