Skip to content

Commit

Permalink
Fix add partition case (selectdb#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
w41ter authored and lsy3993 committed Jun 7, 2024
1 parent e6e0ee9 commit ef55d35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ suite("test_add_partition") {
assertTrue(checkRestoreFinishTimesOf("${tableName}", 60))

sql """
INSERT OVERWRITE ${tableName} VALUES (1, 100);
INSERT OVERWRITE TABLE ${tableName} VALUES (1, 100);
"""

assertTrue(checkShowTimesOf("""
Expand Down

0 comments on commit ef55d35

Please sign in to comment.