mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-04 11:30:14 -05:00
dolt/go/libraries/doltcore/diff: AsyncDiffer.Start takes Maps, does not need *Format.
This commit is contained in:
committed by
Brian Hendriks
parent
b5d78b4cdc
commit
c0e1cb0458
@@ -309,7 +309,7 @@ func diffRows(newRows, oldRows types.Map, newSch, oldSch schema.Schema) errhand.
|
||||
}
|
||||
|
||||
ad := diff.NewAsyncDiffer(1024)
|
||||
ad.Start(context.TODO(), newRows.Format(), newRows, oldRows)
|
||||
ad.Start(context.TODO(), newRows, oldRows)
|
||||
defer ad.Close()
|
||||
|
||||
src := diff.NewRowDiffSource(ad, oldToUnionConv, newToUnionConv, untypedUnionSch)
|
||||
|
||||
@@ -30,14 +30,14 @@ func tableDontDescendLists(v1, v2 types.Value) bool {
|
||||
return !types.IsPrimitiveKind(kind) && kind != types.TupleKind && kind == v2.Kind() && kind != types.RefKind
|
||||
}
|
||||
|
||||
func (ad *AsyncDiffer) Start(ctx context.Context, format *types.Format, v1, v2 types.Value) {
|
||||
func (ad *AsyncDiffer) Start(ctx context.Context, v1, v2 types.Map) {
|
||||
go func() {
|
||||
defer close(ad.diffChan)
|
||||
defer func() {
|
||||
// Ignore a panic from Diff...
|
||||
recover()
|
||||
}()
|
||||
diff.Diff(ctx, format, v2, v1, ad.diffChan, ad.stopChan, true, tableDontDescendLists)
|
||||
diff.Diff(ctx, v1.Format(), v2, v1, ad.diffChan, ad.stopChan, true, tableDontDescendLists)
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user