提交 473964d9 编写于 作者: W wizardforcel

2019-02-23 23:45:13

上级 937d7962
......@@ -201,10 +201,11 @@ Table result = orders.filter("a % 2 === 0");
* [**Java**](#tab_java_3)
* [**Scala**](#tab_scala_3)
---
算子:**GroupBy聚合** 批处理 流 结果更新
| **GroupBy聚合**
批处理 流
结果更新 | 与SQL GROUP BY子句类似。使用以下运行的聚合 算子对分组键上的行进行分组,以按组聚合行。
描述:与SQL GROUP BY子句类似。使用以下运行的聚合 算子对分组键上的行进行分组,以按组聚合行。
```
......@@ -213,7 +214,8 @@ Table result = orders.groupBy("a").select("a, b.sum as d");
```
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于聚合类型和不同分组键的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。 |
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于聚合类型和不同分组键的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)
---
算子:**GroupBy窗口聚合** 批量 流
......@@ -252,10 +254,11 @@ Table result = orders
```
**注意:**必须在同一窗口中定义所有聚合,即相同的分区,排序和范围。目前,仅支持具有PRREDING(UNBOUNDED和有界)到CURRENT ROW范围的窗口。尚不支持使用FOLLOWING的范围。必须在单个[时间属性](streaming.html#time-attributes)上指定ORDER BY 。 |
| **Distinct**
量 流
果更新 | 与SQL DISTINCT子句类似。返回具有不同值组合的记录。
**注意:**必须在同一窗口中定义所有聚合,即相同的分区,排序和范围。目前,仅支持具有PRREDING(UNBOUNDED和有界)到CURRENT ROW范围的窗口。尚不支持使用FOLLOWING的范围。必须在单个[时间属性](streaming.html#time-attributes)上指定ORDER BY 。
算子:**Distinct** 批量 流 结果更新
描述:与SQL DISTINCT子句类似。返回具有不同值组合的记录。
```
......@@ -288,7 +291,8 @@ Table result = left.join(right).where("a = d").select("a, b, e");
```
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。 |
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)
---
算子:**Outer Join** 批处理 流 结果更新
......@@ -306,7 +310,8 @@ Table fullOuterResult = left.fullOuterJoin(right, "a = d").select("a, b, e");
```
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。 |
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)
---
算子:**Time-windowed Join** 批量 流
......@@ -489,7 +494,7 @@ Table result = left.select("a, b, c").where("a.in(RightTable)");
```
**注意:**对于流式查询, 算子操作将在连接和组 算子操作中重写。计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。 |
**注意:**对于流式查询, 算子操作将在连接和组 算子操作中重写。计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。
......@@ -801,12 +806,10 @@ val table = input
| `partitionBy` | Optional | 定义一个或多个属性上的输入分区。每个分区都单独排序,聚合函数分别应用于每个分区。**注意:**在流式环境中,如果窗口包含partition by子句,则只能并行计算窗口聚合。no / not`partitionBy(...)`流由单个非并行任务处理。 |
| `orderBy` | Required | 定义每个分区中行的顺序,从而定义聚合函数应用于行的顺序。**注意:**对于流式查询,这必须是[声明的事件时间或处理时间属性](streaming.html#time-attributes)。目前,仅支持单个排序属性。 |
| `preceding` | Required | 定义窗口中包含的行的间隔,并在当前行之前。间隔可以指定为时间或行计数间隔。[在窗口](tableApi.html#bounded-over-windows)上限定具有间隔的大小,例如,`10.minutes`对于时间间隔或`10.rows`行计数间隔。[](tableApi.html#unbounded-over-windows)使用常量(即,`UNBOUNDED_RANGE`时间间隔或`UNBOUNDED_ROW`行计数间隔)指定[在窗口](tableApi.html#unbounded-over-windows)[无界限](tableApi.html#unbounded-over-windows)。在Windows上无限制地从分区的第一行开始。 |
| `following` | Optional | 定义窗口中包含的行的窗口间隔,并跟随当前行。必须在与前一个间隔(时间或行计数)相同的单位中指定间隔。目前,不支持在当前行之后包含行的窗口。相反,您可以指定两个常量之一:
* `CURRENT_ROW` 将窗口的上限设置为当前行。
* `CURRENT_RANGE` 设置窗口的上限以对当前行的键进行排序,即窗口中包含与当前行具有相同排序键的所有行。
如果`following`省略该子句,则将时间间隔窗口`CURRENT_RANGE`的上限定义为,并将行计数间隔窗口的上限定义为`CURRENT_ROW`。 |
| `following` | Optional | 定义窗口中包含的行的窗口间隔,并跟随当前行。必须在与前一个间隔(时间或行计数)相同的单位中指定间隔。目前,不支持在当前行之后包含行的窗口。相反,您可以指定两个常量之一: |
| | `CURRENT_ROW` 将窗口的上限设置为当前行。 |
| | `CURRENT_RANGE` 设置窗口的上限以对当前行的键进行排序,即窗口中包含与当前行具有相同排序键的所有行。 |
| | 如果`following`省略该子句,则将时间间隔窗口`CURRENT_RANGE`的上限定义为,并将行计数间隔窗口的上限定义为`CURRENT_ROW`。 |
| `as` | Required | 为覆盖窗口指定别名。别名用于引用以下`select()`子句中的over window 。 |
**注意:**目前,同一`select()`调用中的所有聚合函数必须计算相同的窗口。
......
......@@ -297,7 +297,8 @@ SELECT DISTINCT users FROM Orders
```
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同字段的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。 |
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同字段的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。
---
操作:**分组集,汇总,多维数据集** 批量
......@@ -362,7 +363,8 @@ FROM Orders INNER JOIN Product ON Orders.productId = Product.id
```
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。 |
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。
---
操作:**外部Equi-join** 批量 流 结果更新
......@@ -382,7 +384,8 @@ FROM Orders FULL OUTER JOIN Product ON Orders.productId = Product.id
```
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。 |
**注意:**对于流式查询,计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)
---
操作:**Time-windowed Join** 批量 流
......@@ -402,7 +405,8 @@ WHERE o.id = s.orderId AND
```
如果订单在收到订单后四小时发货,上面的示例将关联所有订单及其相应的货件。 |
如果订单在收到订单后四小时发货,上面的示例将关联所有订单及其相应的货件。
---
操作:**将数组扩展为关系** Batch Streaming
......@@ -439,7 +443,7 @@ FROM Orders LEFT JOIN LATERAL TABLE(unnest_udtf(tags)) t AS tag ON TRUE
```
**注意:**目前,`TRUE`对于横向表,只支持左外连接的谓词作为谓词。 |
**注意:**目前,`TRUE`对于横向表,只支持左外连接的谓词作为谓词。
### 设置 算子操作
......@@ -523,7 +527,8 @@ WHERE product IN (
```
**注意:**对于流式查询, 算子操作将在连接和组 算子操作中重写。计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)。 |
**注意:**对于流式查询, 算子操作将在连接和组 算子操作中重写。计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)
---
操作:**Exists** 批量 流
......@@ -540,7 +545,7 @@ WHERE product EXISTS (
```
**注意:**对于流式查询, 算子操作将在连接和组 算子操作中重写。计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html) |
**注意:**对于流式查询, 算子操作将在连接和组 算子操作中重写。计算查询结果所需的状态可能会无限增长,具体取决于不同输入行的数量。请提供具有有效保存间隔的查询配置,以防止过大的状态。有关详细信息,请参阅[Streaming Concepts](streaming.html)
### OrderBy&Limit
......@@ -616,22 +621,18 @@ FROM Orders
| 辅助函数 | 描述 |
| --- | --- |
| `TUMBLE_START(time_attr, interval)`
`HOP_START(time_attr, interval, interval)`
`SESSION_START(time_attr, interval)`
| 返回相应的翻滚,跳跃或会话窗口的包含下限的时间戳。 |
| `TUMBLE_END(time_attr, interval)`
`HOP_END(time_attr, interval, interval)`
`SESSION_END(time_attr, interval)`
| 返回相应的翻滚,跳跃或会话窗口的_独占_上限的时间戳。**注意:**独占上限时间戳_不能_在后续基于时间的 算子操作中用作[行时属性](streaming.html#time-attributes),例如[时间窗口连接](#joins)[组窗口或窗口聚合](#aggregations)。 |
| `TUMBLE_ROWTIME(time_attr, interval)`
`HOP_ROWTIME(time_attr, interval, interval)`
`SESSION_ROWTIME(time_attr, interval)`
| 返回相应的翻滚,跳跃或会话窗口的_包含_上限的时间戳。结果属性是[rowtime属性](streaming.html#time-attributes),可用于后续基于时间的 算子操作,例如[时间窗口连接](#joins)[组窗口或窗口聚合](#aggregations)。 |
| `TUMBLE_PROCTIME(time_attr, interval)`
`HOP_PROCTIME(time_attr, interval, interval)`
`SESSION_PROCTIME(time_attr, interval)`
| 返回[proctime属性](streaming.html#time-attributes),该[属性](streaming.html#time-attributes)可用于后续基于时间的 算子操作,例如[时间窗口连接](#joins)[组窗口或窗口聚合](#aggregations)。 |
| `TUMBLE_START(time_attr, interval)` | 返回相应的翻滚,跳跃或会话窗口的包含下限的时间戳。 |
| `HOP_START(time_attr, interval, interval)` | |
| `SESSION_START(time_attr, interval)` | |
| `TUMBLE_END(time_attr, interval)` | 返回相应的翻滚,跳跃或会话窗口的_独占_上限的时间戳。**注意:**独占上限时间戳_不能_在后续基于时间的 算子操作中用作[行时属性](streaming.html#time-attributes),例如[时间窗口连接](#joins)[组窗口或窗口聚合](#aggregations)。 |
| `HOP_END(time_attr, interval, interval)` | |
| `SESSION_END(time_attr, interval)` | |
| `TUMBLE_ROWTIME(time_attr, interval)` | 返回相应的翻滚,跳跃或会话窗口的_包含_上限的时间戳。结果属性是[rowtime属性](streaming.html#time-attributes),可用于后续基于时间的 算子操作,例如[时间窗口连接](#joins)[组窗口或窗口聚合](#aggregations)。 |
| `HOP_ROWTIME(time_attr, interval, interval)` | |
| `SESSION_ROWTIME(time_attr, interval)` | |
| `TUMBLE_PROCTIME(time_attr, interval)` | 返回[proctime属性](streaming.html#time-attributes),该[属性](streaming.html#time-attributes)可用于后续基于时间的 算子操作,例如[时间窗口连接](#joins)[组窗口或窗口聚合](#aggregations)。 |
| `HOP_PROCTIME(time_attr, interval, interval)` | |
| `SESSION_PROCTIME(time_attr, interval)` | |
_注意:_必须使用与`GROUP BY`子句中的组窗口函数完全相同的参数调用辅助函数。
......
......@@ -659,9 +659,9 @@ next.within(Time.seconds(10))
* [**Java**](#tab_java_11)
* [**Scala**](#tab_scala_11)
| 模式 算子操作 | 描述 |
| --- | --- |
| **连续的()** | 与匹配事件一起使用`oneOrMore()``times()`强制执行严格的连续性,即任何不匹配的数据元都会中断匹配(如`next()`)。如果不应用,则使用放松的连续性(如`followedBy()`)。例如:
模式操作:`continuous()`
描述:与匹配事件一起使用`oneOrMore()``times()`强制执行严格的连续性,即任何不匹配的数据元都会中断匹配(如`next()`)。如果不应用,则使用放松的连续性(如`followedBy()`)。例如:
```
......@@ -686,8 +686,12 @@ Pattern.<Event>begin("start").where(new SimpleCondition<Event>() {
```
将为输入序列生成以下匹配项:CD A1 A2 A3 D A4 B.连续申请:{C A1 B},{C A1 A2 B},{C A1 A2 A3 B}没有连续申请:{C A1 B},{C A1 A2 B},{C A1 A2 A3 B},{C A1 A2 A3 A4 B} |
| **allowCombinations()** | 与匹配事件一起使用`oneOrMore()`并且`times()`在匹配事件之间施加非确定性松弛连续性(如`followedByAny()`)。如果不应用,则使用放松的连续性(如`followedBy()`)。例如:
将为输入序列生成以下匹配项:CD A1 A2 A3 D A4 B.连续申请:{C A1 B},{C A1 A2 B},{C A1 A2 A3 B}没有连续申请:{C A1 B},{C A1 A2 B},{C A1 A2 A3 B},{C A1 A2 A3 A4 B}
模式操作:`allowCombinations()`
描述:与匹配事件一起使用`oneOrMore()`并且`times()`在匹配事件之间施加非确定性松弛连续性(如`followedByAny()`)。如果不应用,则使用放松的连续性(如`followedBy()`)。例如:
```
......@@ -712,34 +716,8 @@ Pattern.<Event>begin("start").where(new SimpleCondition<Event>() {
```
将为输入序列生成以下匹配项:CD A1 A2 A3 D A4 B.启用组合:{C A1 B},{C A1 A2 B},{C A1 A3 B},{C A1 A4 B},{C A1 A2 A3 B},{C A1 A2 A4 B},{C A1 A3 A4 B},{C A1 A2 A3 A4 B}未启用组合:{C A1 B},{C A1 A2 B},{C A1 A2 A3 B},{C A1 A2 A3 A4 B} |
| Pattern Operation | Description |
| --- | --- |
| **consecutive()** | Works in conjunction with `oneOrMore()` and `times()` and imposes strict contiguity between the matching events, i.e. any non-matching element breaks the match (as in `next()`).If not applied a relaxed contiguity (as in `followedBy()`) is used.E.g. a pattern like:
```
Pattern.begin("start").where(_.getName().equals("c"))
.followedBy("middle").where(_.getName().equals("a"))
.oneOrMore().consecutive()
.followedBy("end1").where(_.getName().equals("b"))
```
Will generate the following matches for an input sequence: C D A1 A2 A3 D A4 Bwith consecutive applied: {C A1 B}, {C A1 A2 B}, {C A1 A2 A3 B}without consecutive applied: {C A1 B}, {C A1 A2 B}, {C A1 A2 A3 B}, {C A1 A2 A3 A4 B} |
| **allowCombinations()** | Works in conjunction with `oneOrMore()` and `times()` and imposes non-deterministic relaxed contiguity between the matching events (as in `followedByAny()`).If not applied a relaxed contiguity (as in `followedBy()`) is used.E.g. a pattern like:
```
Pattern.begin("start").where(_.getName().equals("c"))
.followedBy("middle").where(_.getName().equals("a"))
.oneOrMore().allowCombinations()
.followedBy("end1").where(_.getName().equals("b"))
```
将为输入序列生成以下匹配项:CD A1 A2 A3 D A4 B.启用组合:{C A1 B},{C A1 A2 B},{C A1 A3 B},{C A1 A4 B},{C A1 A2 A3 B},{C A1 A2 A4 B},{C A1 A3 A4 B},{C A1 A2 A3 A4 B}未启用组合:{C A1 B},{C A1 A2 B},{C A1 A2 A3 B},{C A1 A2 A3 A4 B}
Will generate the following matches for an input sequence: C D A1 A2 A3 D A4 Bwith combinations enabled: {C A1 B}, {C A1 A2 B}, {C A1 A3 B}, {C A1 A4 B}, {C A1 A2 A3 B}, {C A1 A2 A4 B}, {C A1 A3 A4 B}, {C A1 A2 A3 A4 B}without combinations enabled: {C A1 B}, {C A1 A2 B}, {C A1 A2 A3 B}, {C A1 A2 A3 A4 B} |
### 模式组
......@@ -948,165 +926,6 @@ Pattern<Event, ?> notFollowedBy = start.notFollowedBy("not");
pattern.within(Time.seconds(10));
```
---
模式操作:Pattern Operation
描述:Description |
---
模式操作:`begin(#name)`
描述:Defines a starting pattern:
```
val start = Pattern.begin[Event]("start")
```
---
模式操作:`begin(#pattern_sequence)`
描述:Defines a starting pattern:
```
val start = Pattern.begin(
Pattern.begin[Event]("start").where(...).followedBy("middle").where(...)
)
```
---
模式操作:`next(#name)`
描述:Appends a new pattern. A matching event has to directly succeed the previous matching event (strict contiguity):
```
val next = start.next("middle")
```
---
模式操作:`next(#pattern_sequence)`
描述:Appends a new pattern. A sequence of matching events have to directly succeed the previous matching event (strict contiguity):
```
val next = start.next(
Pattern.begin[Event]("start").where(...).followedBy("middle").where(...)
)
```
---
模式操作:`followedBy(#name)`
描述:Appends a new pattern. Other events can occur between a matching event and the previous matching event (relaxed contiguity) :
```
val followedBy = start.followedBy("middle")
```
---
模式操作:`followedBy(#pattern_sequence)`
描述:Appends a new pattern. Other events can occur between a sequence of matching events and the previous matching event (relaxed contiguity) :
```
val followedBy = start.followedBy(
Pattern.begin[Event]("start").where(...).followedBy("middle").where(...)
)
```
---
模式操作:`followedByAny(#name)`
描述:Appends a new pattern. Other events can occur between a matching event and the previous matching event, and alternative matches will be presented for every alternative matching event (non-deterministic relaxed contiguity):
```
val followedByAny = start.followedByAny("middle")
```
---
模式操作:`followedByAny(#pattern_sequence)`
描述:Appends a new pattern. Other events can occur between a sequence of matching events and the previous matching event, and alternative matches will be presented for every alternative sequence of matching events (non-deterministic relaxed contiguity):
```
val followedByAny = start.followedByAny(
Pattern.begin[Event]("start").where(...).followedBy("middle").where(...)
)
```
---
模式操作:`notNext()`
描述:Appends a new negative pattern. A matching (negative) event has to directly succeed the previous matching event (strict contiguity) for the partial match to be discarded:
```
val notNext = start.notNext("not")
```
---
模式操作:`notFollowedBy()`
描述:Appends a new negative pattern. A partial matching event sequence will be discarded even if other events occur between the matching (negative) event and the previous matching event (relaxed contiguity):
```
val notFollowedBy = start.notFollowedBy("not")
```
---
模式操作:`within(time)`
描述:Defines the maximum time interval for an event sequence to match the pattern. If a non-completed event sequence exceeds this time, it is discarded:
```
pattern.within(Time.seconds(10))
```
### 比赛后跳过策略
对于给定模式,可以将同一事件分配给多个成功匹配。要控制将分配事件的匹配数,您需要指定调用的跳过策略`AfterMatchSkipStrategy`。跳过策略有四种类型,如下所示:
......@@ -1122,32 +941,27 @@ pattern.within(Time.seconds(10))
| 跳过策略 | 结果 | 描述 |
| --- | --- | --- |
| **NO_SKIP** | `b1 b2 b3 c`
`b2 b3 c`
`b3 c`
| 找到匹配后`b1 b2 b3 c`,匹配过程不会丢弃任何结果。 |
| **SKIP_PAST_LAST_EVENT** | `b1 b2 b3 c`
| 找到匹配后`b1 b2 b3 c`,匹配过程将丢弃所有已开始的部分匹配。 |
| **SKIP_TO_FIRST** [ `b*`] | `b1 b2 b3 c`
`b2 b3 c`
`b3 c`
| 找到匹配后`b1 b2 b3 c`,匹配过程将尝试丢弃之前开始的所有部分匹配`b1`,但是没有这样的匹配。因此,不会丢弃任何东西。 |
| **SKIP_TO_LAST** [ `b`] | `b1 b2 b3 c`
`b3 c`
| 找到匹配后`b1 b2 b3 c`,匹配过程将尝试丢弃之前开始的所有部分匹配`b3`。有一个这样的比赛`b2 b3 c` |
| **NO_SKIP** | `b1 b2 b3 c` | 找到匹配后`b1 b2 b3 c`,匹配过程不会丢弃任何结果。 |
| | `b2 b3 c` | |
| | `b3 c` | |
| **SKIP_PAST_LAST_EVENT** | `b1 b2 b3 c` | 找到匹配后`b1 b2 b3 c`,匹配过程将丢弃所有已开始的部分匹配。 |
| **SKIP_TO_FIRST** [ `b*`] | `b1 b2 b3 c` | 找到匹配后`b1 b2 b3 c`,匹配过程将尝试丢弃之前开始的所有部分匹配`b1`,但是没有这样的匹配。因此,不会丢弃任何东西。 |
| | `b2 b3 c` | |
| | `b3 c` | |
| **SKIP_TO_LAST** [ `b`] | `b1 b2 b3 c` | 找到匹配后`b1 b2 b3 c`,匹配过程将尝试丢弃之前开始的所有部分匹配`b3`。有一个这样的比赛`b2 b3 c` |
| | `b3 c` | |
看看另一个例子,以便更好地看到NO_SKIP和SKIP_TO_FIRST之间的区别:模式:`(a | c) (b | c) c+.greedy d`和序列:`a b c1 c2 c3 d`然后结果将是:
| 跳过策略 | 结果 | 描述 |
| --- | --- | --- |
| **NO_SKIP** | `a b c1 c2 c3 d`
`b c1 c2 c3 d`
`c1 c2 c3 d`
`c2 c3 d`
| 找到匹配后`a b c1 c2 c3 d`,匹配过程不会丢弃任何结果。 |
| **SKIP_TO_FIRST** [ `b*`] | `a b c1 c2 c3 d`
`c1 c2 c3 d`
| 找到匹配后`a b c1 c2 c3 d`,匹配过程将尝试丢弃之前开始的所有部分匹配`c1`。有一个这样的比赛`b c1 c2 c3 d`。 |
| **NO_SKIP** | `a b c1 c2 c3 d` | 找到匹配后`a b c1 c2 c3 d`,匹配过程不会丢弃任何结果。 |
| | `b c1 c2 c3 d` | |
| | `c1 c2 c3 d` | |
| | `c2 c3 d` | |
| **SKIP_TO_FIRST** [ `b*`] | `a b c1 c2 c3 d` | 找到匹配后`a b c1 c2 c3 d`,匹配过程将尝试丢弃之前开始的所有部分匹配`c1`。有一个这样的比赛`b c1 c2 c3 d`。 |
| | `c1 c2 c3 d` | |
要指定要使用的跳过策略,只需`AfterMatchSkipStrategy`通过调用创建:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册