Skip to content

Commit

Permalink
[no-release-notes] Unique ids cleanup bump
Browse files Browse the repository at this point in the history
  • Loading branch information
max-hoffman committed Dec 1, 2023
1 parent 18f65fb commit 6e88cb4
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 183 deletions.
2 changes: 1 addition & 1 deletion go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ require (
github.com/cespare/xxhash v1.1.0
github.com/creasty/defaults v1.6.0
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
github.com/dolthub/go-mysql-server v0.17.1-0.20231201021351-97a2867b8225
github.com/dolthub/go-mysql-server v0.17.1-0.20231201194219-89ea8b3f36d0
github.com/dolthub/swiss v0.1.0
github.com/goccy/go-json v0.10.2
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
Expand Down
2 changes: 2 additions & 0 deletions go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e h1:kPsT4a47cw
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e/go.mod h1:KPUcpx070QOfJK1gNe0zx4pA5sicIK1GMikIGLKC168=
github.com/dolthub/go-mysql-server v0.17.1-0.20231201021351-97a2867b8225 h1:6+FqniHHZRWNfuXtIlvSLUWoZhJEixyWYcgSsPlT69U=
github.com/dolthub/go-mysql-server v0.17.1-0.20231201021351-97a2867b8225/go.mod h1:vXlRKS39WHav9N51VsfYphKhmSA2t5FkhHmW3BtwH5I=
github.com/dolthub/go-mysql-server v0.17.1-0.20231201194219-89ea8b3f36d0 h1:Im2ghAy8y+37LUQ/Wjr3KmNIU70x3jY8B2QzcZ+MXh8=
github.com/dolthub/go-mysql-server v0.17.1-0.20231201194219-89ea8b3f36d0/go.mod h1:vXlRKS39WHav9N51VsfYphKhmSA2t5FkhHmW3BtwH5I=
github.com/dolthub/ishell v0.0.0-20221214210346-d7db0b066488 h1:0HHu0GWJH0N6a6keStrHhUAK5/o9LVfkh44pvsV4514=
github.com/dolthub/ishell v0.0.0-20221214210346-d7db0b066488/go.mod h1:ehexgi1mPxRTk0Mok/pADALuHbvATulTh6gzr7NzZto=
github.com/dolthub/jsonpath v0.0.2-0.20230525180605-8dc13778fd72 h1:NfWmngMi1CYUWU4Ix8wM+USEhjc+mhPlT9JUR/anvbQ=
Expand Down
22 changes: 0 additions & 22 deletions go/libraries/doltcore/sqle/dolt_diff_stat_table_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ type DiffStatTableFunction struct {
dotCommitExpr sql.Expression
tableNameExpr sql.Expression
database sql.Database
tabId sql.TableId
colset sql.ColSet
}

var diffStatTableSchema = sql.Schema{
Expand Down Expand Up @@ -79,26 +77,6 @@ func (ds *DiffStatTableFunction) NewInstance(ctx *sql.Context, db sql.Database,
return node, nil
}

func (ds *DiffStatTableFunction) WithId(id sql.TableId) sql.TableIdNode {
ret := *ds
ret.tabId = id
return &ret
}

func (ds *DiffStatTableFunction) Id() sql.TableId {
return ds.tabId
}

func (ds *DiffStatTableFunction) WithColumns(set sql.ColSet) sql.TableIdNode {
ret := *ds
ds.colset = set
return &ret
}

func (ds *DiffStatTableFunction) Columns() sql.ColSet {
return ds.colset
}

func (ds *DiffStatTableFunction) DataLength(ctx *sql.Context) (uint64, error) {
numBytesPerRow := schema.SchemaAvgLength(ds.Schema())
numRows, _, err := ds.RowCount(ctx)
Expand Down
22 changes: 0 additions & 22 deletions go/libraries/doltcore/sqle/dolt_diff_summary_table_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ type DiffSummaryTableFunction struct {
dotCommitExpr sql.Expression
tableNameExpr sql.Expression
database sql.Database
tabId sql.TableId
colset sql.ColSet
}

var diffSummaryTableSchema = sql.Schema{
Expand All @@ -69,26 +67,6 @@ func (ds *DiffSummaryTableFunction) NewInstance(ctx *sql.Context, db sql.Databas
return node, nil
}

func (ds *DiffSummaryTableFunction) WithId(id sql.TableId) sql.TableIdNode {
ret := *ds
ret.tabId = id
return &ret
}

func (ds *DiffSummaryTableFunction) Id() sql.TableId {
return ds.tabId
}

func (ds *DiffSummaryTableFunction) WithColumns(set sql.ColSet) sql.TableIdNode {
ret := *ds
ret.colset = set
return &ret
}

func (ds *DiffSummaryTableFunction) Columns() sql.ColSet {
return ds.colset
}

func (ds *DiffSummaryTableFunction) DataLength(ctx *sql.Context) (uint64, error) {
numBytesPerRow := schema.SchemaAvgLength(ds.Schema())
numRows, _, err := ds.RowCount(ctx)
Expand Down
23 changes: 0 additions & 23 deletions go/libraries/doltcore/sqle/dolt_diff_table_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,6 @@ type DiffTableFunction struct {
tableDelta diff.TableDelta
fromDate *types.Timestamp
toDate *types.Timestamp

tabId sql.TableId
colset sql.ColSet
}

func (dtf *DiffTableFunction) WithId(id sql.TableId) sql.TableIdNode {
ret := *dtf
ret.tabId = id
return &ret
}

func (dtf *DiffTableFunction) Id() sql.TableId {
return dtf.tabId
}

func (dtf *DiffTableFunction) WithColumns(set sql.ColSet) sql.TableIdNode {
ret := *dtf
ret.colset = set
return &ret
}

func (dtf *DiffTableFunction) Columns() sql.ColSet {
return dtf.colset
}

// NewInstance creates a new instance of TableFunction interface
Expand Down
23 changes: 0 additions & 23 deletions go/libraries/doltcore/sqle/dolt_log_table_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ type LogTableFunction struct {
showParents bool
decoration string

tabId sql.TableId
colset sql.ColSet

database sql.Database
}

Expand All @@ -77,26 +74,6 @@ func (ltf *LogTableFunction) NewInstance(ctx *sql.Context, db sql.Database, expr
return node, nil
}

func (ltf *LogTableFunction) WithId(id sql.TableId) sql.TableIdNode {
ret := *ltf
ret.tabId = id
return &ret
}

func (ltf *LogTableFunction) Id() sql.TableId {
return ltf.tabId
}

func (ltf *LogTableFunction) WithColumns(set sql.ColSet) sql.TableIdNode {
ret := *ltf
ret.colset = set
return &ret
}

func (ltf *LogTableFunction) Columns() sql.ColSet {
return ltf.colset
}

// Database implements the sql.Databaser interface
func (ltf *LogTableFunction) Database() sql.Database {
return ltf.database
Expand Down
22 changes: 0 additions & 22 deletions go/libraries/doltcore/sqle/dolt_patch_table_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,6 @@ type PatchTableFunction struct {
dotCommitExpr sql.Expression
tableNameExpr sql.Expression
database sql.Database
tabId sql.TableId
colset sql.ColSet
}

func (p *PatchTableFunction) WithId(id sql.TableId) sql.TableIdNode {
ret := *p
ret.tabId = id
return &ret
}

func (p *PatchTableFunction) Id() sql.TableId {
return p.tabId
}

func (p *PatchTableFunction) WithColumns(set sql.ColSet) sql.TableIdNode {
ret := *p
ret.colset = set
return &ret
}

func (p *PatchTableFunction) Columns() sql.ColSet {
return p.colset
}

func (p *PatchTableFunction) DataLength(ctx *sql.Context) (uint64, error) {
Expand Down
23 changes: 0 additions & 23 deletions go/libraries/doltcore/sqle/dolt_query_diff_table_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,6 @@ type QueryDiffTableFunction struct {
rowIter2 sql.RowIter
schema1 sql.Schema
schema2 sql.Schema

tabId sql.TableId
colset sql.ColSet
}

func (tf *QueryDiffTableFunction) WithId(id sql.TableId) sql.TableIdNode {
ret := *tf
ret.tabId = id
return &ret
}

func (tf *QueryDiffTableFunction) Id() sql.TableId {
return tf.tabId
}

func (tf *QueryDiffTableFunction) WithColumns(set sql.ColSet) sql.TableIdNode {
ret := *tf
ret.colset = set
return &ret
}

func (tf *QueryDiffTableFunction) Columns() sql.ColSet {
return tf.colset
}

// NewInstance creates a new instance of TableFunction interface
Expand Down
22 changes: 0 additions & 22 deletions go/libraries/doltcore/sqle/dolt_schema_diff_table_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ type SchemaDiffTableFunction struct {
tableNameExpr sql.Expression

database sql.Database

tabId sql.TableId
colset sql.ColSet
}

var schemaDiffTableSchema = sql.Schema{
Expand All @@ -87,25 +84,6 @@ func (ds *SchemaDiffTableFunction) NewInstance(ctx *sql.Context, db sql.Database
return node, nil
}

func (ds *SchemaDiffTableFunction) WithId(id sql.TableId) sql.TableIdNode {
//TODO implement me
panic("implement me")
}

func (ds *SchemaDiffTableFunction) Id() sql.TableId {
return ds.tabId
}

func (ds *SchemaDiffTableFunction) WithColumns(set sql.ColSet) sql.TableIdNode {
ret := *ds
ds.colset = set
return &ret
}

func (ds *SchemaDiffTableFunction) Columns() sql.ColSet {
return ds.colset
}

func (ds *SchemaDiffTableFunction) DataLength(ctx *sql.Context) (uint64, error) {
numBytesPerRow := schema.SchemaAvgLength(ds.Schema())
numRows, _, err := ds.RowCount(ctx)
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/sqle/enginetest/dolt_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ func TestBrokenSystemTableQueries(t *testing.T) {
}

func TestHistorySystemTable(t *testing.T) {
harness := newDoltHarness(t).WithParallelism(1)
harness := newDoltHarness(t).WithParallelism(2)
defer harness.Close()
harness.Setup(setup.MydbData)
for _, test := range HistorySystemTableScriptTests {
Expand Down
3 changes: 1 addition & 2 deletions go/libraries/doltcore/sqle/history_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ func (ht *HistoryTable) Collation() sql.CollationID {

// Partitions returns a PartitionIter which will be used in getting partitions each of which is used to create RowIter.
func (ht *HistoryTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error) {
// TODO reset ht.cmItr on close
iter, err := ht.filterIter(ctx, ht.cmItr)
if err != nil {
return nil, err
Expand Down Expand Up @@ -462,7 +461,7 @@ func (cp commitPartitioner) Next(ctx *sql.Context) (sql.Partition, error) {

// Close closes the partitioner
func (cp commitPartitioner) Close(ctx *sql.Context) error {
cp.cmItr.Reset(ctx)
cp.cmItr.Reset(ctx)
return nil
}

Expand Down
22 changes: 0 additions & 22 deletions go/libraries/doltcore/sqle/reflog_table_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ type ReflogTableFunction struct {
ctx *sql.Context
database sql.Database
refExpr sql.Expression
tabId sql.TableId
colset sql.ColSet
}

var _ sql.TableFunction = (*ReflogTableFunction)(nil)
Expand All @@ -60,26 +58,6 @@ func (rltf *ReflogTableFunction) NewInstance(ctx *sql.Context, database sql.Data
return node, nil
}

func (rltf *ReflogTableFunction) WithId(id sql.TableId) sql.TableIdNode {
ret := *rltf
ret.tabId = id
return &ret
}

func (rltf *ReflogTableFunction) Id() sql.TableId {
return rltf.tabId
}

func (rltf *ReflogTableFunction) WithColumns(set sql.ColSet) sql.TableIdNode {
ret := *rltf
ret.colset = set
return &ret
}

func (rltf *ReflogTableFunction) Columns() sql.ColSet {
return rltf.colset
}

func (rltf *ReflogTableFunction) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error) {
sqlDb, ok := rltf.database.(dsess.SqlDatabase)
if !ok {
Expand Down

0 comments on commit 6e88cb4

Please sign in to comment.