[
https://issues.apache.org/jira/browse/METRON-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16112782#comment-16112782
]
ASF GitHub Bot commented on METRON-379:
---------------------------------------
Github user ottobackwards commented on the issue:
https://github.com/apache/metron/pull/675
Right. This PR adds the Language Capability to required variables be
passed based on the VariableResolver implementation defined. Which can be
defined based on the requirements of the 'host' -> so Enrichments and Parsers
use Map, which is forgiving because of the reasons you mention.
Lambdas use their own, which is forgiving, because in a lambda (x) -> DO(x)
you can name 'x' whatever you want.
> Stellar - No Error When Adding Variables That Do Not Exist
> ----------------------------------------------------------
>
> Key: METRON-379
> URL: https://issues.apache.org/jira/browse/METRON-379
> Project: Metron
> Issue Type: Bug
> Affects Versions: 0.2.1BETA
> Reporter: Nick Allen
> Assignee: Otto Fowler
> Labels: stellar
>
> Running a Stellar expression like "1 + var + does + not + exist" results in a
> value of 1.0. I would expect an exception or error condition.
> {code:title=StellarTest.java|borderStyle=solid}
> @Test(expected = ParseException.class)
> public void testMissingVariables() {
> String query = "1 + cannot + add + missing + variables";
> run(query, new HashMap<>());
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)