From e8cb2bc43e68b3e1ecd05f816f10db9891ee6124 Mon Sep 17 00:00:00 2001 From: caogaoshuai <2937287330@qq.com> Date: Fri, 11 Aug 2023 15:53:22 +0800 Subject: [PATCH] fix:inserting failure when the values contain 'value' (#2932) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix:inserting failure when the values contain 'value' * refactor: another fix solution * refactor: amazing solution --------- Co-authored-by: 劲松 --- .../streampark/flink/connector/failover/SinkRequest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streampark-flink/streampark-flink-connector/streampark-flink-connector-base/src/main/scala/org/apache/streampark/flink/connector/failover/SinkRequest.scala b/streampark-flink/streampark-flink-connector/streampark-flink-connector-base/src/main/scala/org/apache/streampark/flink/connector/failover/SinkRequest.scala index 18140f0881..9593d6c7c1 100644 --- a/streampark-flink/streampark-flink-connector/streampark-flink-connector-base/src/main/scala/org/apache/streampark/flink/connector/failover/SinkRequest.scala +++ b/streampark-flink/streampark-flink-connector/streampark-flink-connector-base/src/main/scala/org/apache/streampark/flink/connector/failover/SinkRequest.scala @@ -33,7 +33,7 @@ case class SinkRequest(records: util.List[String], var attemptCounter: Int = 0) Pattern.compile("(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+(values|value)(.*)", Pattern.CASE_INSENSITIVE) lazy val sqlStatement: String = { val prefixMap: Map[String, List[String]] = Map[String, List[String]]()