flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dawidwys <...@git.apache.org>
Subject [GitHub] flink pull request #3477: [Flink-3318][cep] Add support for quantifiers to C...
Date Tue, 14 Mar 2017 09:34:48 GMT
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3477#discussion_r105857677
  
    --- Diff: flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/NFAITCase.java
---
    @@ -272,37 +372,42 @@ public void testBranchingPattern() {
     			public boolean filter(Event value) throws Exception {
     				return value.getName().equals("start");
     			}
    -		})
    -			.followedBy("middle-first").subtype(SubEvent.class).where(new FilterFunction<SubEvent>()
{
    +		}).followedBy("middle-first").subtype(SubEvent.class)
    +			.where(new FilterFunction<SubEvent>() {
     				private static final long serialVersionUID = 6215754202506583964L;
     
     				@Override
     				public boolean filter(SubEvent value) throws Exception {
    -					return value.getVolume() > 5.0;
    +					return value.getVolume() >
    +					       5.0;
     				}
     			})
    -			.followedBy("middle-second").subtype(SubEvent.class).where(new FilterFunction<SubEvent>()
{
    +			.followedBy("middle-second").subtype(SubEvent.class)
    +			.where(new FilterFunction<SubEvent>() {
     				private static final long serialVersionUID = 6215754202506583964L;
     
     				@Override
     				public boolean filter(SubEvent value) throws Exception {
    -					return value.getName().equals("next-one");
    +					return value.getName()
    +						.equals(
    +							"next-one");
     				}
     			})
     			.followedBy("end").where(new FilterFunction<Event>() {
     				private static final long serialVersionUID = 7056763917392056548L;
     
     				@Override
     				public boolean filter(Event value) throws Exception {
    -					return value.getName().equals("end");
    +					return value.getName()
    +						.equals("end");
     				}
     			});
     
     		NFA<Event> nfa = NFACompiler.compile(pattern, Event.createTypeSerializer(), false);
     
     		List<Map<String, Event>> resultingPatterns = new ArrayList<>();
     
    -		for (StreamRecord<Event> inputEvent: inputEvents) {
    +		for (StreamRecord<Event> inputEvent : inputEvents) {
    --- End diff --
    
    Reverted


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

Mime
View raw message