Skip to content

Commit

Permalink
Fix add partition sql (selectdb#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
w41ter authored May 30, 2024
1 parent 8012569 commit 2dc9ed1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ccr/base/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ func correctAddPartitionSql(addPartitionSql string, addPartition *record.AddPart
// 1. fix unpartitioned add partition sql
// 2. support add temporary partition
if strings.Contains(addPartitionSql, "VALUES [(), ())") {
re := regexp.MustCompile(`VALUES \[\(\), \(\)\) \(.*^\)\)`)
re := regexp.MustCompile(`VALUES \[\(\), \(\)\) \([^\)]+\)`)
addPartitionSql = re.ReplaceAllString(addPartitionSql, "")
}
if strings.Contains(addPartitionSql, "VALUES IN (((") {
Expand Down

0 comments on commit 2dc9ed1

Please sign in to comment.