Skip to content

Commit

Permalink
Fix add partition sql (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
w41ter authored and lsy3993 committed Jun 7, 2024
1 parent 4ece35a commit d0383b4
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 @@ -835,7 +835,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 d0383b4

Please sign in to comment.