From fb1ea48775061cc42f78b1c30ccca464c522d655 Mon Sep 17 00:00:00 2001 From: Neil Macneale IV Date: Fri, 3 Mar 2023 13:42:15 -0800 Subject: [PATCH] Small cleanups requested in PR --- go/libraries/doltcore/sqle/dtables/diff_table.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/go/libraries/doltcore/sqle/dtables/diff_table.go b/go/libraries/doltcore/sqle/dtables/diff_table.go index 5782ccacef..a33ba6ce6c 100644 --- a/go/libraries/doltcore/sqle/dtables/diff_table.go +++ b/go/libraries/doltcore/sqle/dtables/diff_table.go @@ -862,7 +862,7 @@ func GetDiffTableSchemaAndJoiner(format *types.NomsBinFormat, fromSch, toSch sch return nil, nil, err } } else { - fromSch, toSch, err = ResolveSchemaCollections(fromSch, toSch) + fromSch, toSch, err = expandFromToSchemas(fromSch, toSch) if err != nil { return nil, nil, err } @@ -888,9 +888,9 @@ func GetDiffTableSchemaAndJoiner(format *types.NomsBinFormat, fromSch, toSch sch return } -// Convert schemas to ColCollections. One argument must be non-nil. If one is null, the result will be the columns -// of the non-nil argument. -func ResolveSchemaCollections(fromSch, toSch schema.Schema) (newFromSch, newToSch schema.Schema, err error) { +// expandFromToSchemas converts input schemas to schemas appropriate for diffs. One argument must be +// non-nil. If one is null, the result will be the columns of the non-nil argument. +func expandFromToSchemas(fromSch, toSch schema.Schema) (newFromSch, newToSch schema.Schema, err error) { var fromClmCol, toClmCol *schema.ColCollection if fromSch == nil && toSch == nil { return nil, nil, errors.New("non-nil argument required to CalculateDiffSchema") @@ -921,8 +921,7 @@ func ResolveSchemaCollections(fromSch, toSch schema.Schema) (newFromSch, newToSc // CalculateDiffSchema returns the schema for the dolt_diff table based on the schemas from the from and to tables. // Either may be nil, in which case the nil argument will use the schema of the non-nil argument func CalculateDiffSchema(fromSch, toSch schema.Schema) (schema.Schema, error) { - // - fromSch, toSch, err := ResolveSchemaCollections(fromSch, toSch) + fromSch, toSch, err := expandFromToSchemas(fromSch, toSch) if err != nil { return nil, err }