Skip to content

Commit 0d38aab

Browse files
authored
Merge branch 'main' into angela/funcdeps_bump
2 parents b1571a1 + a46d000 commit 0d38aab

File tree

111 files changed

+1624
-609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1624
-609
lines changed

go/cmd/dolt/doltversion/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
package doltversion
1616

1717
const (
18-
Version = "1.76.3"
18+
Version = "1.76.4"
1919
)

go/libraries/doltcore/dbfactory/grpc.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
remotesapi "github.com/dolthub/dolt/go/gen/proto/dolt/services/remotesapi/v1alpha1"
2626
"github.com/dolthub/dolt/go/libraries/doltcore/grpcendpoint"
2727
"github.com/dolthub/dolt/go/libraries/doltcore/remotestorage"
28-
"github.com/dolthub/dolt/go/libraries/events"
2928
"github.com/dolthub/dolt/go/store/chunks"
3029
"github.com/dolthub/dolt/go/store/datas"
3130
"github.com/dolthub/dolt/go/store/prolly/tree"
@@ -117,8 +116,7 @@ func (fact DoltRemoteFactory) newChunkStore(ctx context.Context, nbf *types.Noms
117116
return nil, err
118117
}
119118

120-
opts := append(cfg.DialOptions, grpc.WithChainUnaryInterceptor(remotestorage.EventsUnaryClientInterceptor(events.GlobalCollector())))
121-
opts = append(opts, grpc.WithChainUnaryInterceptor(remotestorage.RetryingUnaryClientInterceptor))
119+
opts := append(cfg.DialOptions, grpc.WithChainUnaryInterceptor(remotestorage.RetryingUnaryClientInterceptor))
122120

123121
conn, err := grpc.Dial(cfg.Endpoint, opts...)
124122
if err != nil {

go/libraries/doltcore/diff/diff_stat.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type DiffStatProgress struct {
3838
Adds, Removes, Changes, CellChanges, NewRowSize, OldRowSize, NewCellSize, OldCellSize uint64
3939
}
4040

41-
type prollyReporter func(ctx context.Context, vMapping val.OrdinalMapping, fromD, toD val.TupleDesc, change tree.Diff, ch chan<- DiffStatProgress) error
41+
type prollyReporter func(ctx context.Context, vMapping val.OrdinalMapping, fromD, toD *val.TupleDesc, change tree.Diff, ch chan<- DiffStatProgress) error
4242
type nomsReporter func(ctx context.Context, change *diff.Difference, fromSch, toSch schema.Schema, ch chan<- DiffStatProgress) error
4343

4444
// Stat reports a stat of diff changes between two values
@@ -234,7 +234,7 @@ func statWithReporter(ctx context.Context, ch chan DiffStatProgress, from, to ty
234234
return nil
235235
}
236236

237-
func reportPkChanges(ctx context.Context, vMapping val.OrdinalMapping, fromD, toD val.TupleDesc, change tree.Diff, ch chan<- DiffStatProgress) error {
237+
func reportPkChanges(ctx context.Context, vMapping val.OrdinalMapping, fromD, toD *val.TupleDesc, change tree.Diff, ch chan<- DiffStatProgress) error {
238238
var stat DiffStatProgress
239239
switch change.Type {
240240
case tree.AddedDiff:
@@ -255,7 +255,7 @@ func reportPkChanges(ctx context.Context, vMapping val.OrdinalMapping, fromD, to
255255
}
256256
}
257257

258-
func reportKeylessChanges(ctx context.Context, vMapping val.OrdinalMapping, fromD, toD val.TupleDesc, change tree.Diff, ch chan<- DiffStatProgress) error {
258+
func reportKeylessChanges(ctx context.Context, vMapping val.OrdinalMapping, fromD, toD *val.TupleDesc, change tree.Diff, ch chan<- DiffStatProgress) error {
259259
var stat DiffStatProgress
260260
var n, n2 uint64
261261
switch change.Type {
@@ -286,7 +286,7 @@ func reportKeylessChanges(ctx context.Context, vMapping val.OrdinalMapping, from
286286

287287
// prollyCountCellDiff counts the number of changes columns between two tuples
288288
// |from| and |to|. |mapping| should map columns from |from| to |to|.
289-
func prollyCountCellDiff(ctx context.Context, mapping val.OrdinalMapping, fromD, toD val.TupleDesc, from, to val.Tuple) uint64 {
289+
func prollyCountCellDiff(ctx context.Context, mapping val.OrdinalMapping, fromD, toD *val.TupleDesc, from, to val.Tuple) uint64 {
290290
newCols := uint64(toD.Count())
291291
changed := uint64(0)
292292
for i, j := range mapping {

go/libraries/doltcore/doltdb/durable/index.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ func newEmptyIndex(ctx context.Context, vrw types.ValueReadWriter, ns tree.NodeS
168168
}
169169
}
170170

171-
func NewEmptyProllyIndex(ctx context.Context, ns tree.NodeStore, kd, vd val.TupleDesc) (Index, error) {
171+
func NewEmptyProllyIndex(ctx context.Context, ns tree.NodeStore, kd, vd *val.TupleDesc) (Index, error) {
172172
m, err := prolly.NewMapFromTuples(ctx, ns, kd, vd)
173173
if err != nil {
174174
return nil, err
175175
}
176176
return IndexFromProllyMap(m), nil
177177
}
178178

179-
func NewEmptyProximityIndex(ctx context.Context, ns tree.NodeStore, kd, vd val.TupleDesc) (Index, error) {
179+
func NewEmptyProximityIndex(ctx context.Context, ns tree.NodeStore, kd, vd *val.TupleDesc) (Index, error) {
180180
proximityMapBuilder, err := prolly.NewProximityMapBuilder(ctx, ns, vector.DistanceL2Squared{}, kd, vd, prolly.DefaultLogChunkSize)
181181
if err != nil {
182182
return nil, err

go/libraries/doltcore/doltdb/durable/table.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ type Table interface {
7575
// GetTableRows returns this table's rows.
7676
GetTableRows(ctx context.Context) (Index, error)
7777
// GetTableRowsWithDescriptors returns this table's rows with fewer deserialization calls
78-
GetTableRowsWithDescriptors(ctx context.Context, kd, vd val.TupleDesc) (Index, error)
78+
GetTableRowsWithDescriptors(ctx context.Context, kd, vd *val.TupleDesc) (Index, error)
7979
// SetTableRows sets this table's rows.
8080
SetTableRows(ctx context.Context, rows Index) (Table, error)
8181

@@ -330,7 +330,7 @@ func (t nomsTable) GetTableRows(ctx context.Context) (Index, error) {
330330
return indexFromRef(ctx, t.vrw, t.ns, sch, val.(types.Ref))
331331
}
332332

333-
func (t nomsTable) GetTableRowsWithDescriptors(ctx context.Context, kd, vd val.TupleDesc) (Index, error) {
333+
func (t nomsTable) GetTableRowsWithDescriptors(ctx context.Context, kd, vd *val.TupleDesc) (Index, error) {
334334
return nil, fmt.Errorf("nomsTable does not implement GetTableRowsWithDescriptors")
335335
}
336336

@@ -857,7 +857,7 @@ func (t doltDevTable) GetTableRows(ctx context.Context) (Index, error) {
857857
return IndexFromMapInterface(m), nil
858858
}
859859

860-
func (t doltDevTable) GetTableRowsWithDescriptors(ctx context.Context, kd, vd val.TupleDesc) (Index, error) {
860+
func (t doltDevTable) GetTableRowsWithDescriptors(ctx context.Context, kd, vd *val.TupleDesc) (Index, error) {
861861
rowbytes := t.msg.PrimaryIndexBytes()
862862
m, err := shim.MapFromValueWithDescriptors(types.SerialMessage(rowbytes), kd, vd, t.ns)
863863
if err != nil {

go/libraries/doltcore/doltdb/ignore.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var ConvertTupleToIgnoreBoolean = convertTupleToIgnoreBoolean
5959
// GetIgnoreTablePatternKey is a function that converts a Tuple to a string for the pattern field. This is used to handle the Doltgres extended string type.
6060
var GetIgnoreTablePatternKey = getIgnoreTablePatternKey
6161

62-
func convertTupleToIgnoreBoolean(ctx context.Context, valueDesc val.TupleDesc, valueTuple val.Tuple) (bool, error) {
62+
func convertTupleToIgnoreBoolean(ctx context.Context, valueDesc *val.TupleDesc, valueTuple val.Tuple) (bool, error) {
6363
if !valueDesc.Equals(val.NewTupleDescriptor(val.Type{Enc: val.Int8Enc, Nullable: false})) {
6464
return false, fmt.Errorf("dolt_ignore had unexpected value type, this should never happen")
6565
}
@@ -70,7 +70,7 @@ func convertTupleToIgnoreBoolean(ctx context.Context, valueDesc val.TupleDesc, v
7070
return ignore, nil
7171
}
7272

73-
func getIgnoreTablePatternKey(ctx context.Context, keyDesc val.TupleDesc, keyTuple val.Tuple) (string, error) {
73+
func getIgnoreTablePatternKey(ctx context.Context, keyDesc *val.TupleDesc, keyTuple val.Tuple) (string, error) {
7474
if !keyDesc.Equals(val.NewTupleDescriptor(val.Type{Enc: val.StringEnc, Nullable: false})) {
7575
return "", fmt.Errorf("dolt_ignore had unexpected key type, this should never happen")
7676
}

go/libraries/doltcore/doltdb/nonlocal_tables.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var GetNonlocalTablesRef = getNonlocalTablesRef
3030
// GetNonlocalTablesNameColumn is a function that reads the "table_name" column from dolt_nonlocal_tables. This is used to handle the Doltgres extended string type.
3131
var GetNonlocalTablesNameColumn = getNonlocalTablesNameColumn
3232

33-
func getNonlocalTablesNameColumn(_ context.Context, keyDesc val.TupleDesc, keyTuple val.Tuple) (string, error) {
33+
func getNonlocalTablesNameColumn(_ context.Context, keyDesc *val.TupleDesc, keyTuple val.Tuple) (string, error) {
3434
key, ok := keyDesc.GetString(0, keyTuple)
3535
if !ok {
3636
return "", fmt.Errorf("failed to read global table")
@@ -44,7 +44,7 @@ type NonlocalTableEntry struct {
4444
Options string
4545
}
4646

47-
func getNonlocalTablesRef(_ context.Context, valDesc val.TupleDesc, valTuple val.Tuple) (result NonlocalTableEntry) {
47+
func getNonlocalTablesRef(_ context.Context, valDesc *val.TupleDesc, valTuple val.Tuple) (result NonlocalTableEntry) {
4848
result.Ref, _ = valDesc.GetString(0, valTuple)
4949
result.NewTableName, _ = valDesc.GetString(1, valTuple)
5050
result.Options, _ = valDesc.GetString(2, valTuple)

go/libraries/doltcore/doltdb/table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ func (t *Table) GetRowData(ctx context.Context) (durable.Index, error) {
445445
return t.table.GetTableRows(ctx)
446446
}
447447

448-
func (t *Table) GetRowDataWithDescriptors(ctx context.Context, kd, vd val.TupleDesc) (durable.Index, error) {
448+
func (t *Table) GetRowDataWithDescriptors(ctx context.Context, kd, vd *val.TupleDesc) (durable.Index, error) {
449449
return t.table.GetTableRowsWithDescriptors(ctx, kd, vd)
450450
}
451451

go/libraries/doltcore/merge/merge_prolly_rows.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ func mergeProllyTableData(ctx *sql.Context, tm *TableMerger, finalSch schema.Sch
493493
return finalTbl, s, nil
494494
}
495495

496-
func threeWayDiffer(ctx context.Context, tm *TableMerger, valueMerger *valueMerger, diffInfo tree.ThreeWayDiffInfo) (*tree.ThreeWayDiffer[val.Tuple, val.TupleDesc], error) {
496+
func threeWayDiffer(ctx context.Context, tm *TableMerger, valueMerger *valueMerger, diffInfo tree.ThreeWayDiffInfo) (*tree.ThreeWayDiffer[val.Tuple, *val.TupleDesc], error) {
497497
lr, err := tm.leftTbl.GetRowData(ctx)
498498
if err != nil {
499499
return nil, err
@@ -586,7 +586,7 @@ func (cv checkValidator) validateDiff(ctx *sql.Context, diff tree.ThreeWayDiff)
586586
conflictCount := 0
587587

588588
var valueTuple val.Tuple
589-
var valueDesc val.TupleDesc
589+
var valueDesc *val.TupleDesc
590590
switch diff.Op {
591591
case tree.DiffOpLeftDelete, tree.DiffOpRightDelete, tree.DiffOpConvergentDelete, tree.DiffOpDivergentDeleteResolved:
592592
// no need to validate check constraints for deletes
@@ -888,11 +888,11 @@ type uniqIndex struct {
888888
def schema.Index
889889
secondary *prolly.MutableMap
890890
clustered *prolly.MutableMap
891+
prefixDesc *val.TupleDesc
892+
clusteredKeyDesc *val.TupleDesc
891893
meta UniqCVMeta
892-
prefixDesc val.TupleDesc
893894
secondaryBld index.SecondaryKeyBuilder
894895
clusteredBld index.ClusteredKeyBuilder
895-
clusteredKeyDesc val.TupleDesc
896896
}
897897

898898
func newUniqIndex(ctx *sql.Context, sch schema.Schema, tableName string, def schema.Index, clustered, secondary prolly.Map) (uniqIndex, error) {
@@ -1605,7 +1605,7 @@ func (m *secondaryMerger) finalize(ctx context.Context) (durable.IndexSet, durab
16051605

16061606
// remapTuple takes the given |tuple| and the |desc| that describes its data, and uses |mapping| to map the tuple's
16071607
// data into a new [][]byte, as indicated by the specified ordinal mapping.
1608-
func remapTuple(tuple val.Tuple, desc val.TupleDesc, mapping val.OrdinalMapping) [][]byte {
1608+
func remapTuple(tuple val.Tuple, desc *val.TupleDesc, mapping val.OrdinalMapping) [][]byte {
16091609
result := make([][]byte, len(mapping))
16101610
for to, from := range mapping {
16111611
if from == -1 {
@@ -1630,7 +1630,7 @@ func remapTuple(tuple val.Tuple, desc val.TupleDesc, mapping val.OrdinalMapping)
16301630
func remapTupleWithColumnDefaults(
16311631
ctx *sql.Context,
16321632
keyTuple, valueTuple val.Tuple,
1633-
valDesc val.TupleDesc,
1633+
valDesc *val.TupleDesc,
16341634
mapping val.OrdinalMapping,
16351635
tm *TableMerger,
16361636
rowSch schema.Schema,
@@ -1799,7 +1799,7 @@ func mergeTableArtifacts(ctx context.Context, tm *TableMerger, mergeTbl *doltdb.
17991799
// a three-way cell edit (tree.DiffOpDivergentModifyResolved).
18001800
type valueMerger struct {
18011801
numCols int
1802-
baseVD, leftVD, rightVD, resultVD val.TupleDesc
1802+
baseVD, leftVD, rightVD, resultVD *val.TupleDesc
18031803
leftSchema, rightSchema, resultSchema schema.Schema
18041804
leftMapping, rightMapping, baseMapping val.OrdinalMapping
18051805
baseToLeftMapping val.OrdinalMapping
@@ -1997,7 +1997,7 @@ func (m *valueMerger) processBaseColumn(ctx context.Context, i int, left, right,
19971997
var modifiedCol []byte
19981998
var modifiedColIdx int
19991999
var modifiedSchema schema.Schema
2000-
var modifiedVD val.TupleDesc
2000+
var modifiedVD *val.TupleDesc
20012001
if !leftColExists {
20022002
modifiedCol, modifiedColIdx = rightCol, rightColIdx
20032003
modifiedSchema = m.rightSchema
@@ -2332,7 +2332,7 @@ func getColumn(tuple *val.Tuple, mapping *val.OrdinalMapping, idx int) (col []by
23322332

23332333
// convert takes the `i`th column in the provided tuple and converts it to the type specified in the provided schema.
23342334
// returns the new representation, and a bool indicating success.
2335-
func convert(ctx context.Context, fromDesc, toDesc val.TupleDesc, toSchema schema.Schema, fromIndex, toIndex int, tuple val.Tuple, originalValue []byte, ns tree.NodeStore) ([]byte, error) {
2335+
func convert(ctx context.Context, fromDesc, toDesc *val.TupleDesc, toSchema schema.Schema, fromIndex, toIndex int, tuple val.Tuple, originalValue []byte, ns tree.NodeStore) ([]byte, error) {
23362336
if fromDesc.Types[fromIndex] == toDesc.Types[toIndex] {
23372337
// No conversion is necessary here.
23382338
return originalValue, nil

go/libraries/doltcore/merge/merge_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type rowV struct {
6363
col1, col2 int
6464
}
6565

66-
var vD val.TupleDesc
66+
var vD *val.TupleDesc
6767
var vB *val.TupleBuilder
6868
var syncPool = pool.NewBuffPool()
6969

@@ -788,7 +788,7 @@ func buildLeftRightAncCommitsAndBranches(t *testing.T, ddb *doltdb.DoltDB, rootT
788788
return mergeCommit, ancCm, root, mergeRoot, ancRoot
789789
}
790790

791-
var kD val.TupleDesc
791+
var kD *val.TupleDesc
792792
var kB *val.TupleBuilder
793793

794794
func key(i int) val.Tuple {

0 commit comments

Comments
 (0)