shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] 
Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387438795
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -335,88 +332,87 @@ start.where(event => event.getName.startsWith("foo"))
 </div>
 </div>
 
-Finally, you can also restrict the type of the accepted event to a subtype of 
the initial event type (here `Event`)
-via the `pattern.subtype(subClass)` method.
+最后,你可以通过`pattern.subtype(subClass)`方法限制接受的事件类型是初始事件的子类型。
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
 start.subtype(SubEvent.class).where(new SimpleCondition<SubEvent>() {
     @Override
     public boolean filter(SubEvent value) {
-        return ... // some condition
+        return ... // 一些判断条件
     }
 });
 {% endhighlight %}
 </div>
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
-start.subtype(classOf[SubEvent]).where(subEvent => ... /* some condition */)
+start.subtype(classOf[SubEvent]).where(subEvent => ... /* 一些判断条件 */)
 {% endhighlight %}
 </div>
 </div>
 
-**Combining Conditions:** As shown above, you can combine the `subtype` 
condition with additional conditions. This holds for every condition. You can 
arbitrarily combine conditions by sequentially calling `where()`. The final 
result will be the logical **AND** of the results of the individual conditions. 
To combine conditions using **OR**, you can use the `or()` method, as shown 
below.
+**组合条件:** 如上所示,你可以把`subtype`条件和其他的条件结合起来使用。这适用于任何条件,你可以通过依次调用`where()`来组合条件。
+最终的结果是是每个单一条件的结果的逻辑**AND**。如果想使用**OR**来组合条件,你可以使用像下面这样使用`or()`方法。
 
 Review comment:
   done

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to