metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cestella <...@git.apache.org>
Subject [GitHub] metron pull request #742: METRON-1168: Add SUBSTRING method to stellar
Date Fri, 08 Sep 2017 21:31:10 GMT
Github user cestella commented on a diff in the pull request:

    https://github.com/apache/metron/pull/742#discussion_r137894087
  
    --- Diff: metron-stellar/stellar-common/src/test/java/org/apache/metron/stellar/dsl/functions/StringFunctionsTest.java
---
    @@ -408,6 +408,19 @@ public void testAppendIfMissing() throws Exception {
     
       }
     
    +  @Test
    +  public void testSubstring() throws Exception {
    +    Map<String, Object> variables = ImmutableMap.of("s", "apache metron");
    +    Assert.assertEquals("metron", run("SUBSTRING(s, 7)", variables));
    +    Assert.assertEquals("me", run("SUBSTRING(s, 7, 9)", variables));
    +    Assert.assertNull(run("SUBSTRING(null, 6, 9)", new HashMap<>()));
    --- End diff --
    
    yep


---

Mime
View raw message