caogaoshuai commented on code in PR #2932:
URL:
https://github.com/apache/incubator-streampark/pull/2932#discussion_r1290058415
##########
streampark-flink/streampark-flink-connector/streampark-flink-connector-base/src/main/scala/org/apache/streampark/flink/connector/failover/SinkRequest.scala:
##########
@@ -30,21 +30,21 @@ case class SinkRequest(records: util.List[String], var
attemptCounter: Int = 0)
def size: Int = records.size()
private[this] lazy val TABLE_REGEXP =
- Pattern.compile("(insert\\s+into|update|delete)\\s+(.*?)(\\(|\\s+)",
Pattern.CASE_INSENSITIVE)
+ Pattern.compile("^\\s*(insert\\s+into|update|delete)\\s+(.*?)(\\(|\\s+)",
Pattern.CASE_INSENSITIVE)
private[this] lazy val INSERT_REGEXP =
- Pattern.compile("^(.*)\\s+(values|value)(.*)", Pattern.CASE_INSENSITIVE)
+
Pattern.compile("^\\s*(insert\\s+into)\\s+(`?([a-zA-Z]\\w*)`?.)?`?([a-zA-Z]\\w*)`?((\\s*\\((\\s*`?[a-zA-Z]\\w*`?\\s*)*\\))|(\\s+))\\s*(value|values)\\s*(\\(.*\\))\\s*;?",
Pattern.CASE_INSENSITIVE)
Review Comment:
Thank you for your reminder, I now use another method to fix this bug
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]