You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "wolfboys (via GitHub)" <gi...@apache.org> on 2023/02/22 09:59:17 UTC

[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2355: [Issues-2348] support with clause

wolfboys commented on code in PR #2355:
URL: https://github.com/apache/incubator-streampark/pull/2355#discussion_r1114094193


##########
streampark-flink/streampark-flink-shims/streampark-flink-shims-base/src/main/scala/org/apache/streampark/flink/core/SqlCommandParser.scala:
##########
@@ -172,6 +172,19 @@ object SqlCommand extends enumeratum.Enum[SqlCommand] {
         "create catalog",
         "(CREATE\\s+CATALOG\\s+.+)")
 
+  /**
+   * <pre>
+   * WITH <with_item_definition> [ , ... ]
+   * SELECT ... FROM ...;
+   *
+   * <with_item_defintion>:
+   * with_item_name (column_name[, ...n]) AS ( <select_query> )
+   * </pre>
+   */
+  case object WITH extends SqlCommand(
+  "with",
+  "(with.+as.+\\(\\s*SELECT.+\\))")

Review Comment:
   uppercase would be better:
   ```"(WITH.+AS.+\\(\\s*SELECT.+\\))"```



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

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org