From 28d30070cb04fedb70292039de8772e1f3ec9b5e Mon Sep 17 00:00:00 2001 From: Zach Musgrave Date: Thu, 12 Nov 2026 23:55:01 +0000 Subject: [PATCH 1/3] Support window frame EXCLUDE clauses. --- go.mod | 4 + server/ast/window.go | 15 ++ server/functions/aggregate/avg_aggregates.go | 12 +- server/functions/aggregate/json_aggregates.go | 6 +- .../functions/aggregate/numeric_aggregates.go | 12 +- .../aggregate/variance_aggregates.go | 8 +- server/functions/aggregate/xml_aggregates.go | 2 +- server/functions/window/nth_value.go | 6 +- testing/go/window_test.go | 201 ++++++++++++++++++ 9 files changed, 243 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index 6a931f51d7..d63bc8bea7 100644 --- a/go.mod +++ b/go.mod @@ -223,3 +223,7 @@ require ( gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/dolthub/go-mysql-server => ../../../go-mysql-server/zachmu/window-frame-exclude + +replace github.com/dolthub/vitess => ../../../vitess/zachmu/window-frame-exclude diff --git a/server/ast/window.go b/server/ast/window.go index 406c5fd8a9..7d5b892a70 100644 --- a/server/ast/window.go +++ b/server/ast/window.go @@ -93,12 +93,27 @@ func nodeWindowDef(ctx *Context, node *tree.WindowDef) (*vitess.WindowDef, error Type: boundType, } } + var exclusion vitess.FrameExclusion + switch node.Frame.Exclusion { + case tree.NoExclusion: + exclusion = vitess.ExcludeNoOthers + case tree.ExcludeCurrentRow: + exclusion = vitess.ExcludeCurrentRow + case tree.ExcludeGroup: + exclusion = vitess.ExcludeGroup + case tree.ExcludeTies: + exclusion = vitess.ExcludeTies + default: + return nil, errors.Errorf("unknown window frame exclusion") + } + frame = &vitess.Frame{ Unit: unit, Extent: &vitess.FrameExtent{ Start: bounds[0], End: bounds[1], }, + Exclusion: exclusion, } } return &vitess.WindowDef{ diff --git a/server/functions/aggregate/avg_aggregates.go b/server/functions/aggregate/avg_aggregates.go index 4a790b49d6..02064bb07b 100644 --- a/server/functions/aggregate/avg_aggregates.go +++ b/server/functions/aggregate/avg_aggregates.go @@ -137,11 +137,11 @@ func newIntAvgWindowFunction[T int16 | int32](exprs []sql.Expression, window *sq } func (w *intAvgWindowFunction[T]) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } var sum, count int64 - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { v, err := w.expr.Eval(ctx, buf[i]) if err != nil { return nil, err @@ -226,12 +226,12 @@ func newDecimalAvgWindowFunction[T int64 | *apd.Decimal](convert func(T) *apd.De } func (w *decimalAvgWindowFunction[T]) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } var sum apd.Decimal var count int64 - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { v, err := w.expr.Eval(ctx, buf[i]) if err != nil { return nil, err @@ -312,12 +312,12 @@ func newFloatAvgWindowFunction[T float32 | float64](exprs []sql.Expression, wind } func (w *floatAvgWindowFunction[T]) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } var sum float64 var count int64 - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { v, err := w.expr.Eval(ctx, buf[i]) if err != nil { return nil, err diff --git a/server/functions/aggregate/json_aggregates.go b/server/functions/aggregate/json_aggregates.go index 278b88b03d..0069d161d4 100644 --- a/server/functions/aggregate/json_aggregates.go +++ b/server/functions/aggregate/json_aggregates.go @@ -115,15 +115,15 @@ func newJsonAggWindowFunction(exprs []sql.Expression, window *sql.WindowDefiniti // Compute implements sql.WindowFunction. func (w *jsonAggWindowFunction) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } - elements := make([]string, 0, interval.End-interval.Start) + elements := make([]string, 0, interval.Len()) elemType, ok := w.expr.Type(ctx).(*pgtypes.DoltgresType) if !ok { return nil, errors.Errorf("json_agg: expected PostgreSQL argument type, got %T", w.expr.Type(ctx)) } - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { value, err := w.expr.Eval(ctx, buffer[i]) if err != nil { return nil, err diff --git a/server/functions/aggregate/numeric_aggregates.go b/server/functions/aggregate/numeric_aggregates.go index c3dfc14c7a..28e257609e 100644 --- a/server/functions/aggregate/numeric_aggregates.go +++ b/server/functions/aggregate/numeric_aggregates.go @@ -126,12 +126,12 @@ func newIntSumWindowFunction[T int16 | int32](exprs []sql.Expression, window *sq } func (w *intSumWindowFunction[T]) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } var sum int64 var sawOne bool - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { v, err := w.expr.Eval(ctx, buf[i]) if err != nil { return nil, err @@ -224,12 +224,12 @@ func newDecimalSumWindowFunction[T int64 | *apd.Decimal](convert func(T) *apd.De } func (w *decimalSumWindowFunction[T]) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } var sum apd.Decimal var sawOne bool - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { v, err := w.expr.Eval(ctx, buf[i]) if err != nil { return nil, err @@ -315,12 +315,12 @@ func newFloatSumWindowFunction[T float32 | float64](exprs []sql.Expression, wind } func (w *floatSumWindowFunction[T]) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } var sum T var sawOne bool - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { v, err := w.expr.Eval(ctx, buf[i]) if err != nil { return nil, err diff --git a/server/functions/aggregate/variance_aggregates.go b/server/functions/aggregate/variance_aggregates.go index 840fbccb82..7fce4db61f 100644 --- a/server/functions/aggregate/variance_aggregates.go +++ b/server/functions/aggregate/variance_aggregates.go @@ -335,11 +335,11 @@ func newDecimalVarianceWindowFunction[T int16 | int32 | int64 | *apd.Decimal](co } func (w *decimalVarianceWindowFunction[T]) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } b := &decimalVarianceBuffer[T]{expr: w.expr, convert: w.convert, sample: w.sample, sqrtResult: w.sqrtResult} - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { if err := b.Update(ctx, buf[i]); err != nil { return nil, err } @@ -446,11 +446,11 @@ func newFloatVarianceWindowFunction[T float32 | float64](sample, sqrtResult bool } func (w *floatVarianceWindowFunction[T]) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } b := &floatVarianceBuffer[T]{expr: w.expr, sample: w.sample, sqrtResult: w.sqrtResult} - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { if err := b.Update(ctx, buf[i]); err != nil { return nil, err } diff --git a/server/functions/aggregate/xml_aggregates.go b/server/functions/aggregate/xml_aggregates.go index ad0f4e3721..d412456ba1 100644 --- a/server/functions/aggregate/xml_aggregates.go +++ b/server/functions/aggregate/xml_aggregates.go @@ -95,7 +95,7 @@ func newXmlAggWindowFunction(exprs []sql.Expression, window *sql.WindowDefinitio // Compute implements sql.WindowFunction. func (w *xmlAggWindowFunction) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) (interface{}, error) { var result *string - for i := interval.Start; i < interval.End; i++ { + for i := range interval.Indices() { value, err := w.expr.Eval(ctx, buffer[i]) if err != nil { return nil, err diff --git a/server/functions/window/nth_value.go b/server/functions/window/nth_value.go index 624ca44dc5..b0bc5b80ab 100644 --- a/server/functions/window/nth_value.go +++ b/server/functions/window/nth_value.go @@ -62,7 +62,7 @@ func newNthValueWindowFunction(exprs []sql.Expression, window *sql.WindowDefinit // Compute implements the sql.WindowFunction interface. func (w *nthValueWindowFunction) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) (interface{}, error) { - if interval.End <= interval.Start { + if interval.Len() == 0 { return nil, nil } nVal, err := w.nExpr.Eval(ctx, buf[interval.Start]) @@ -80,8 +80,8 @@ func (w *nthValueWindowFunction) Compute(ctx *sql.Context, interval sql.WindowIn return nil, sql.ErrInvalidArgument.New("NTH_VALUE") } - idx := interval.Start + int(n) - 1 - if idx >= interval.End { + idx, ok := interval.Nth(int(n) - 1) + if !ok { return nil, nil } return w.valueExpr.Eval(ctx, buf[idx]) diff --git a/testing/go/window_test.go b/testing/go/window_test.go index b5ffe15ab0..32c2cfaa4e 100644 --- a/testing/go/window_test.go +++ b/testing/go/window_test.go @@ -432,6 +432,207 @@ func TestWindowFunctions(t *testing.T) { }, }, }, + { + // https://github.com/dolthub/doltgresql/issues/3712 + Name: "window frame EXCLUDE clauses", + SetUpScript: []string{ + "CREATE TABLE t (v INT);", + "INSERT INTO t VALUES (1), (2), (2), (3);", + "CREATE TABLE w (id INT PRIMARY KEY, grp INT, k INT, x INT);", + "INSERT INTO w VALUES (1,1,1,10),(2,1,2,20),(3,1,2,30),(4,1,3,NULL),(5,1,5,50),(6,2,1,5),(7,2,1,7),(8,2,1,9),(9,2,4,11);", + }, + Assertions: []ScriptTestAssertion{ + { + Query: "SELECT v, sum(v) OVER (ORDER BY v ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) AS others FROM t ORDER BY v", + Expected: []sql.Row{ + {1, int64(7)}, + {2, int64(6)}, + {2, int64(6)}, + {3, int64(5)}, + }, + }, + { + Query: "SELECT v, count(*) OVER (ORDER BY v ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE GROUP) AS non_peers FROM t ORDER BY v", + Expected: []sql.Row{ + {1, int64(3)}, + {2, int64(2)}, + {2, int64(2)}, + {3, int64(3)}, + }, + }, + { + // Postgres displays these averages with a scale of 16 (e.g. 20.0000000000000000). + Query: "SELECT id, sum(x) OVER win AS s, count(x) OVER win AS c, count(*) OVER win AS cs, avg(x) OVER win AS a, min(x) OVER win AS mn, max(x) OVER win AS mx FROM w WINDOW win AS (PARTITION BY grp ORDER BY k ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW) ORDER BY id", + Expected: []sql.Row{ + {1, int64(20), int64(1), int64(1), Numeric("20"), 20, 20}, + {2, int64(40), int64(2), int64(2), Numeric("20"), 10, 30}, + {3, int64(20), int64(1), int64(2), Numeric("20"), 20, 20}, + {4, int64(80), int64(2), int64(2), Numeric("40"), 30, 50}, + {5, nil, int64(0), int64(1), nil, nil, nil}, + {6, int64(7), int64(1), int64(1), Numeric("7"), 7, 7}, + {7, int64(14), int64(2), int64(2), Numeric("7"), 5, 9}, + {8, int64(18), int64(2), int64(2), Numeric("9"), 7, 11}, + {9, int64(9), int64(1), int64(1), Numeric("9"), 9, 9}, + }, + }, + { + Query: "SELECT id, sum(x) OVER win AS s, count(x) OVER win AS c, count(*) OVER win AS cs, avg(x) OVER win AS a, min(x) OVER win AS mn, max(x) OVER win AS mx FROM w WINDOW win AS (PARTITION BY grp ORDER BY k ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE GROUP) ORDER BY id", + Expected: []sql.Row{ + {1, int64(20), int64(1), int64(1), Numeric("20"), 20, 20}, + {2, int64(10), int64(1), int64(1), Numeric("10"), 10, 10}, + {3, nil, int64(0), int64(1), nil, nil, nil}, + {4, int64(80), int64(2), int64(2), Numeric("40"), 30, 50}, + {5, nil, int64(0), int64(1), nil, nil, nil}, + {6, nil, int64(0), int64(0), nil, nil, nil}, + {7, nil, int64(0), int64(0), nil, nil, nil}, + {8, int64(11), int64(1), int64(1), Numeric("11"), 11, 11}, + {9, int64(9), int64(1), int64(1), Numeric("9"), 9, 9}, + }, + }, + { + Query: "SELECT id, sum(x) OVER win AS s, count(x) OVER win AS c, count(*) OVER win AS cs, avg(x) OVER win AS a, min(x) OVER win AS mn, max(x) OVER win AS mx FROM w WINDOW win AS (PARTITION BY grp ORDER BY k ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE TIES) ORDER BY id", + Expected: []sql.Row{ + {1, int64(30), int64(2), int64(2), Numeric("15"), 10, 20}, + {2, int64(30), int64(2), int64(2), Numeric("15"), 10, 20}, + {3, int64(30), int64(1), int64(2), Numeric("30"), 30, 30}, + {4, int64(80), int64(2), int64(3), Numeric("40"), 30, 50}, + {5, int64(50), int64(1), int64(2), Numeric("50"), 50, 50}, + {6, int64(5), int64(1), int64(1), Numeric("5"), 5, 5}, + {7, int64(7), int64(1), int64(1), Numeric("7"), 7, 7}, + {8, int64(20), int64(2), int64(2), Numeric("10"), 9, 11}, + {9, int64(20), int64(2), int64(2), Numeric("10"), 9, 11}, + }, + }, + { + Query: "SELECT id, sum(x) OVER (PARTITION BY grp ORDER BY k RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW) AS cr, sum(x) OVER (PARTITION BY grp ORDER BY k RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE GROUP) AS g, sum(x) OVER (PARTITION BY grp ORDER BY k RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) AS ti, sum(x) OVER (PARTITION BY grp ORDER BY k RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE NO OTHERS) AS no FROM w ORDER BY id", + Expected: []sql.Row{ + {1, nil, nil, int64(10), int64(10)}, + {2, int64(40), int64(10), int64(30), int64(60)}, + {3, int64(30), int64(10), int64(40), int64(60)}, + {4, int64(60), int64(60), int64(60), int64(60)}, + {5, int64(60), int64(60), int64(110), int64(110)}, + {6, int64(16), nil, int64(5), int64(21)}, + {7, int64(14), nil, int64(7), int64(21)}, + {8, int64(12), nil, int64(9), int64(21)}, + {9, int64(21), int64(21), int64(32), int64(32)}, + }, + }, + { + Query: "SELECT id, count(*) OVER (PARTITION BY grp ORDER BY k RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW) AS cr, count(*) OVER (PARTITION BY grp ORDER BY k RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE GROUP) AS g, count(*) OVER (PARTITION BY grp ORDER BY k RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE TIES) AS ti FROM w ORDER BY id", + Expected: []sql.Row{ + {1, int64(2), int64(2), int64(3)}, + {2, int64(3), int64(2), int64(3)}, + {3, int64(3), int64(2), int64(3)}, + {4, int64(2), int64(2), int64(3)}, + {5, int64(0), int64(0), int64(1)}, + {6, int64(2), int64(0), int64(1)}, + {7, int64(2), int64(0), int64(1)}, + {8, int64(2), int64(0), int64(1)}, + {9, int64(0), int64(0), int64(1)}, + }, + }, + { + Query: "SELECT id, first_value(x) OVER win AS f, last_value(x) OVER win AS l, nth_value(x, 2) OVER win AS n2 FROM w WINDOW win AS (PARTITION BY grp ORDER BY k, id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW) ORDER BY id", + Expected: []sql.Row{ + {1, 20, 50, 30}, + {2, 10, 50, 30}, + {3, 10, 50, 20}, + {4, 10, 50, 20}, + {5, 10, nil, 20}, + {6, 7, 11, 9}, + {7, 5, 11, 9}, + {8, 5, 11, 7}, + {9, 5, 9, 7}, + }, + }, + { + Query: "SELECT id, first_value(id) OVER win AS f, last_value(id) OVER win AS l, nth_value(id, 2) OVER win AS n2 FROM w WINDOW win AS (PARTITION BY grp ORDER BY k RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE GROUP) ORDER BY id", + Expected: []sql.Row{ + {1, 2, 5, 3}, + {2, 1, 5, 4}, + {3, 1, 5, 4}, + {4, 1, 5, 2}, + {5, 1, 4, 2}, + {6, 9, 9, nil}, + {7, 9, 9, nil}, + {8, 9, 9, nil}, + {9, 6, 8, 7}, + }, + }, + { + Query: "SELECT id, first_value(id) OVER win AS f, last_value(id) OVER win AS l, nth_value(id, 2) OVER win AS n2 FROM w WINDOW win AS (PARTITION BY grp ORDER BY k ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE TIES) ORDER BY id", + Expected: []sql.Row{ + {1, 1, 5, 2}, + {2, 2, 5, 4}, + {3, 3, 5, 4}, + {4, 4, 5, 5}, + {5, 5, 5, nil}, + {6, 6, 9, 9}, + {7, 7, 9, 9}, + {8, 8, 9, 9}, + {9, 9, 9, nil}, + }, + }, + { + // Without ORDER BY, every row in the partition is a peer of the current row. + Query: "SELECT id, sum(x) OVER (PARTITION BY grp ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE GROUP) AS s, count(*) OVER (PARTITION BY grp ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE TIES) AS c FROM w ORDER BY id", + Expected: []sql.Row{ + {1, nil, int64(1)}, + {2, nil, int64(1)}, + {3, nil, int64(1)}, + {4, nil, int64(1)}, + {5, nil, int64(1)}, + {6, nil, int64(1)}, + {7, nil, int64(1)}, + {8, nil, int64(1)}, + {9, nil, int64(1)}, + }, + }, + { + // Ranking functions ignore the frame, and so its exclusion. + Query: "SELECT id, row_number() OVER win AS rn, rank() OVER win AS r, dense_rank() OVER win AS dr, sum(x) OVER win AS s FROM w WINDOW win AS (PARTITION BY grp ORDER BY k ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW) ORDER BY id", + Expected: []sql.Row{ + {1, int64(1), int64(1), int64(1), nil}, + {2, int64(2), int64(2), int64(2), int64(10)}, + {3, int64(3), int64(2), int64(2), int64(30)}, + {4, int64(4), int64(4), int64(3), int64(60)}, + {5, int64(5), int64(5), int64(4), int64(60)}, + {6, int64(1), int64(1), int64(1), nil}, + {7, int64(2), int64(1), int64(1), int64(5)}, + {8, int64(3), int64(1), int64(1), int64(12)}, + {9, int64(4), int64(4), int64(2), int64(21)}, + }, + }, + { + Query: "SELECT id, stddev_samp(x) OVER win AS sd FROM w WINDOW win AS (PARTITION BY grp ORDER BY k ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE TIES) ORDER BY id", + Expected: []sql.Row{ + {1, Numeric("17.0782512765993306")}, + {2, Numeric("20.8166599946613274")}, + {3, Numeric("20.0000000000000000")}, + {4, Numeric("17.0782512765993306")}, + {5, Numeric("17.0782512765993306")}, + {6, Numeric("4.2426406871192851")}, + {7, Numeric("2.8284271247461901")}, + {8, Numeric("1.4142135623730950")}, + {9, Numeric("2.5819888974716113")}, + }, + }, + { + Query: "SELECT id, json_agg(x) OVER win AS j FROM w WINDOW win AS (PARTITION BY grp ORDER BY k ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE TIES) ORDER BY id", + Expected: []sql.Row{ + {1, `[10, 20, 30, null, 50]`}, + {2, `[10, 20, null, 50]`}, + {3, `[10, 30, null, 50]`}, + {4, `[10, 20, 30, null, 50]`}, + {5, `[10, 20, 30, null, 50]`}, + {6, `[5, 11]`}, + {7, `[7, 11]`}, + {8, `[9, 11]`}, + {9, `[5, 7, 9, 11]`}, + }, + }, + }, + }, { Name: "variance/stddev window functions over an int column", SetUpScript: []string{ From 1079766d9045bfffe96adcd6d2d9c9f57c8bc874 Mon Sep 17 00:00:00 2001 From: Zach Musgrave Date: Fri, 13 Nov 2026 00:37:29 +0000 Subject: [PATCH 2/3] Depend on the vitess and go-mysql-server versions from the companion PRs. --- go.mod | 8 ++------ go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index d63bc8bea7..98a92472a2 100644 --- a/go.mod +++ b/go.mod @@ -11,10 +11,10 @@ require ( github.com/dolthub/dolt/go v0.40.5-0.20261112144635-0fec1f0fc302 github.com/dolthub/eventsapi_schema v0.0.0-20260715220557-d9b4a1c6b4d4 github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-mysql-server v0.20.1-0.20261112101444-338cc70a7440 + github.com/dolthub/go-mysql-server v0.20.1-0.20261113003506-86e3c85ef58a github.com/dolthub/pg_query_go/v6 v6.0.0-20260922094746-ae7577e21dfe github.com/dolthub/sqllogictest/go v0.0.0-20260624223518-788480b24166 - github.com/dolthub/vitess v0.0.0-20261106002823-dae4b00ae0a4 + github.com/dolthub/vitess v0.0.0-20261112234106-1ce5c8131e09 github.com/fatih/color v1.13.0 github.com/go-sql-driver/mysql v1.9.3 github.com/goccy/go-json v0.10.2 @@ -223,7 +223,3 @@ require ( gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/dolthub/go-mysql-server => ../../../go-mysql-server/zachmu/window-frame-exclude - -replace github.com/dolthub/vitess => ../../../vitess/zachmu/window-frame-exclude diff --git a/go.sum b/go.sum index 20b3cbb9f8..f2ec8899cb 100644 --- a/go.sum +++ b/go.sum @@ -260,8 +260,8 @@ github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 h1:u3PMzfF8RkKd3lB9pZ2bfn0qEG+1G github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2/go.mod h1:mIEZOHnFx4ZMQeawhw9rhsj+0zwQj7adVsnBX7t+eKY= github.com/dolthub/go-icu-regex v0.0.0-20260610153742-72563bc7ca83 h1:FEMjCGEroDnY/BXyAffVZxUpXhP2GpoUJyyq5KaLn8c= github.com/dolthub/go-icu-regex v0.0.0-20260610153742-72563bc7ca83/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE= -github.com/dolthub/go-mysql-server v0.20.1-0.20261112101444-338cc70a7440 h1:E9pgZEEaoxT60KJn3Q4BnLC5QO3ZpIOpNpbb7h2X6Kw= -github.com/dolthub/go-mysql-server v0.20.1-0.20261112101444-338cc70a7440/go.mod h1:rjt2bxGavoo6ynOCXWD6CK52PUaeXjEOoUq5ybz+62o= +github.com/dolthub/go-mysql-server v0.20.1-0.20261113003506-86e3c85ef58a h1:wOCq35Kd5yFNhfNBLdd4+hROCxM3JupezRrMxmzfAbM= +github.com/dolthub/go-mysql-server v0.20.1-0.20261113003506-86e3c85ef58a/go.mod h1:eL1zhgw+FWnBZ8Kixx90CGzGI3VkD6WFDqa18AtFT/I= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q= github.com/dolthub/ishell v0.0.0-20260414231531-5f031e3e9037 h1:oIW9HwuWrhxv+4HZxA+QQSKHLqWFyXZ2FmNjUYwkdiM= @@ -272,8 +272,8 @@ github.com/dolthub/pg_query_go/v6 v6.0.0-20260922094746-ae7577e21dfe h1:5QQHZM+Z github.com/dolthub/pg_query_go/v6 v6.0.0-20260922094746-ae7577e21dfe/go.mod h1:qnrZP3/1slFl2Bq5yw38HLOsArZareGwdpEceriblLc= github.com/dolthub/sqllogictest/go v0.0.0-20260624223518-788480b24166 h1:fdexJBpLDyAGnFbviZYfZ0jhLMnbTWTh39CyQ1EhA28= github.com/dolthub/sqllogictest/go v0.0.0-20260624223518-788480b24166/go.mod h1:e/FIZVvT2IR53HBCAo41NjqgtEnjMJGKca3Y/dAmZaA= -github.com/dolthub/vitess v0.0.0-20261106002823-dae4b00ae0a4 h1:kT+keeNYBnPH3jpt//cT4/xan69IFP0lz8pZyoQFha0= -github.com/dolthub/vitess v0.0.0-20261106002823-dae4b00ae0a4/go.mod h1:5SVEJgAhw5nnQUFnGgKI1Svqes1Mw+zKUsalyxmOuG0= +github.com/dolthub/vitess v0.0.0-20261112234106-1ce5c8131e09 h1:zoMUp2ad2qMvCZuH7kCPJ6klA5oEY3cqY0ezqUtW2nk= +github.com/dolthub/vitess v0.0.0-20261112234106-1ce5c8131e09/go.mod h1:5SVEJgAhw5nnQUFnGgKI1Svqes1Mw+zKUsalyxmOuG0= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= From 218d70f1ae74ac63813ebfebc3d2ba8a11008e2f Mon Sep 17 00:00:00 2001 From: Zach Musgrave Date: Tue, 24 Nov 2026 00:04:32 +0000 Subject: [PATCH 3/3] Pin go-mysql-server to main. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b4250bc339..183265ea2d 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/dolthub/dolt/go v0.40.5-0.20261123214636-32381a651b19 github.com/dolthub/eventsapi_schema v0.0.0-20261119125135-6b30707d614f github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-mysql-server v0.20.1-0.20261123232554-5fcde858d1f9 + github.com/dolthub/go-mysql-server v0.20.1-0.20261124000141-e42d36114c4f github.com/dolthub/pg_query_go/v6 v6.0.0-20260922094746-ae7577e21dfe github.com/dolthub/sqllogictest/go v0.0.0-20260624223518-788480b24166 github.com/dolthub/vitess v0.0.0-20261123232303-53d1e53f2f26 diff --git a/go.sum b/go.sum index 8003461f99..85b2935811 100644 --- a/go.sum +++ b/go.sum @@ -258,8 +258,8 @@ github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 h1:u3PMzfF8RkKd3lB9pZ2bfn0qEG+1G github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2/go.mod h1:mIEZOHnFx4ZMQeawhw9rhsj+0zwQj7adVsnBX7t+eKY= github.com/dolthub/go-icu-regex v0.0.0-20260610153742-72563bc7ca83 h1:FEMjCGEroDnY/BXyAffVZxUpXhP2GpoUJyyq5KaLn8c= github.com/dolthub/go-icu-regex v0.0.0-20260610153742-72563bc7ca83/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE= -github.com/dolthub/go-mysql-server v0.20.1-0.20261123232554-5fcde858d1f9 h1:+AnDoXmRp2voKcZYuclXRVP93HpQkdBcCtZ88BYry9E= -github.com/dolthub/go-mysql-server v0.20.1-0.20261123232554-5fcde858d1f9/go.mod h1:9MXOQ0FwzGSK3gGox5sJqgZCIpOJbBjXeGJENo/9gwo= +github.com/dolthub/go-mysql-server v0.20.1-0.20261124000141-e42d36114c4f h1:3bvVX3KYrBBoPx82JcM/XE6CKoVRbdfriq6fTepbkAQ= +github.com/dolthub/go-mysql-server v0.20.1-0.20261124000141-e42d36114c4f/go.mod h1:9MXOQ0FwzGSK3gGox5sJqgZCIpOJbBjXeGJENo/9gwo= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q= github.com/dolthub/ishell v0.0.0-20260414231531-5f031e3e9037 h1:oIW9HwuWrhxv+4HZxA+QQSKHLqWFyXZ2FmNjUYwkdiM=