twalthr commented on a change in pull request #6815: [FLINK-7062][cep][table]
Added basic support for MATCH_RECOGNIZE
URL: https://github.com/apache/flink/pull/6815#discussion_r224402582
##########
File path:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/RelTimeIndicatorConverter.scala
##########
@@ -245,6 +246,40 @@ class RelTimeIndicatorConverter(rexBuilder: RexBuilder)
extends RelShuttle {
rowType.getFieldList.exists(field => isRowtimeIndicatorType(field.getType))
}
+ private def convertMatch(`match`: Match): LogicalMatch = {
+ val rowType = `match`.getInput.getRowType
+
+ val measures = `match`.getMeasures.foldLeft(mutable.Map[String,
RexNode]()) {
Review comment:
The following simple CEP query leads to a compiler exception:
```
s"""
|SELECT T.pp, T.aid, T.bid, T.cid
|FROM MyTable
|MATCH_RECOGNIZE (
| ORDER BY proctime
| MEASURES
| A.proctime AS pp,
| A.id AS aid,
| B.id AS bid,
| C.id AS cid
| PATTERN (A B C)
| DEFINE
| A AS name = 'a',
| B AS name = 'b',
| C AS name = 'c'
|) AS T
|"""
```
The problem is that the code generator assumes a `ProcessFunction` to be
present to access timer services.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services