metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (METRON-379) Stellar - No Error When Adding Variables That Do Not Exist
Date Thu, 03 Aug 2017 14:04:00 GMT

    [ https://issues.apache.org/jira/browse/METRON-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16112778#comment-16112778
] 

ASF GitHub Bot commented on METRON-379:
---------------------------------------

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

    https://github.com/apache/metron/pull/675#discussion_r131150151
  
    --- Diff: metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/LambdaExpression.java
---
    @@ -56,9 +57,9 @@ public Object apply(List<Object> variableArgs) {
           lambdaVariables.put(variables.get(i), null);
         }
     
    -    VariableResolver variableResolver = variable -> lambdaVariables.getOrDefault(variable
    +    VariableResolver variableResolver = new DefaultVariableResolver(variable -> lambdaVariables.getOrDefault(variable
    --- End diff --
    
    Ok, help me out here, can you give me an example of the impact of this change?  Maybe
a `MAP()` function and how it acts before the change and how it would act after the change?


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

Mime
View raw message