flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] twalthr commented on a change in pull request #6815: [FLINK-7062][cep][table] Added basic support for MATCH_RECOGNIZE
Date Wed, 17 Oct 2018 11:12:26 GMT
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_r225599677
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/MatchCodeGenerator.scala
 ##########
 @@ -245,41 +318,58 @@ class MatchCodeGenerator(
         ""
       }
 
-      val code = s"""
-         |$listTypeTerm $listName = new java.util.ArrayList();
-         |for ($eventTypeTerm $eventNameTerm : $contextTerm.getEventsForPattern("$patternName"))
{
-         |  $listName.add($eventNameTerm);
+      val escapedPatternName = StringEscapeUtils.ESCAPE_JAVA.translate(patternName)
+      reusablePerRecordStatements.add(s"""
+         |this.$listName = new java.util.ArrayList();
 
 Review comment:
   nit: remove `this.` everywhere. we also don't use it elsewhere.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message