Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ jobs:
run: go test -count=1 -v ./tests/integration -run 'CDC'

- name: Run crash recovery origin-filter test
run: go test -count=1 -v ./tests/integration -run 'TestTableDiffOnlyOriginWithUntil'
run: go test -count=1 -v ./tests/integration -run 'TestTableDiffAgainstOriginWithUntil'

- name: Run crash recovery origin-filter test
run: go test -count=1 -v ./tests/integration -run 'TestAdvancedRepairPlan'
13 changes: 11 additions & 2 deletions internal/consistency/repair/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,20 @@ func matchPKIn(matchers []planner.RepairPKMatcher, rowPk map[string]any, pkOrder
return true
}

equal := func(a, b any) bool {
if af, ok := asFloat(a); ok {
if bf, ok2 := asFloat(b); ok2 {
return af == bf
}
}
return reflect.DeepEqual(a, b)
}

for _, m := range matchers {
if simple {
val := rowPk[pkOrder[0]]
for _, eq := range m.Equals {
if reflect.DeepEqual(eq, val) {
if equal(eq, val) {
return true
}
}
Expand All @@ -305,7 +314,7 @@ func matchPKIn(matchers []planner.RepairPKMatcher, rowPk map[string]any, pkOrder
}
all := true
for i, col := range pkOrder {
if !reflect.DeepEqual(rowPk[col], tuple[i]) {
if !equal(rowPk[col], tuple[i]) {
all = false
break
}
Expand Down
Loading
Loading