Skip to content

Commit

Permalink
fix(store): add simple compare function to avoid complex diff generation
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-li committed Jul 12, 2023
1 parent 232dcbc commit 3ca0136
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"math/big"
"os"
"reflect"
"sort"
"sync"
"time"
Expand Down Expand Up @@ -221,6 +222,9 @@ func (ds delegatingStore) Check(ctx context.Context, table *typedef.Table, build
return fmt.Errorf("row count differ (test has %d rows, oracle has %d rows, test is missing rows: %s, oracle is missing rows: %s)",
len(testRows), len(oracleRows), missingInTest, missingInOracle)
}
if reflect.DeepEqual(testRows, oracleRows) {
return nil
}
sort.SliceStable(testRows, func(i, j int) bool {
return lt(testRows[i], testRows[j])
})
Expand Down

0 comments on commit 3ca0136

Please sign in to comment.