You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/10/29 11:52:13 UTC

[GitHub] dawidwys closed pull request #6956: [hotfix][table] Added default branches to pattern matching to supress…

dawidwys closed pull request #6956: [hotfix][table] Added default branches to pattern matching to supress…
URL: https://github.com/apache/flink/pull/6956
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/CommonMatchRecognize.scala b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/CommonMatchRecognize.scala
index 9cf89f9c3fd..8be00bba53e 100644
--- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/CommonMatchRecognize.scala
+++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/CommonMatchRecognize.scala
@@ -77,6 +77,8 @@ trait CommonMatchRecognize {
         case AfterOption.SKIP_PAST_LAST_ROW => "SKIP PAST LAST ROW"
         case AfterOption.SKIP_TO_NEXT_ROW => "SKIP TO NEXT ROW"
       }
+      case _ => throw new IllegalStateException(s"Corrupted query tree. Unexpected $after for " +
+        s"after match strategy.")
     }
 
   private[flink] def matchToString(
diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamMatch.scala b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamMatch.scala
index d3768cc7b1b..2bf6e32c581 100644
--- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamMatch.scala
+++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamMatch.scala
@@ -322,6 +322,8 @@ private[flink] class PatternVisitor(
         AfterMatchSkipStrategy.skipToFirst(getPatternTarget()).throwExceptionOnMiss()
       case SqlKind.SKIP_TO_LAST =>
         AfterMatchSkipStrategy.skipToLast(getPatternTarget()).throwExceptionOnMiss()
+      case _ => throw new IllegalStateException(s"Corrupted query tree. Unexpected " +
+        s"${logicalMatch.after} for after match strategy.")
     }
   }
 


 

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