Skip to content

Commit 7776886

Browse files
committed
bump
1 parent f43dafa commit 7776886

File tree

8 files changed

+18
-15
lines changed

8 files changed

+18
-15
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/dolthub/go-icu-regex v0.0.0-20240916130659-0118adc6b662
77
github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71
88
github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81
9-
github.com/dolthub/vitess v0.0.0-20241002230050-2c2ea65cf324
9+
github.com/dolthub/vitess v0.0.0-20241008184010-3e1d9e5061c3
1010
github.com/go-kit/kit v0.10.0
1111
github.com/go-sql-driver/mysql v1.7.2-0.20231213112541-0004702b931d
1212
github.com/gocraft/dbr/v2 v2.7.2

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 h1:bMGS25NWAGTE
5858
github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71/go.mod h1:2/2zjLQ/JOOSbbSboojeg+cAwcRV0fDLzIiWch/lhqI=
5959
github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 h1:7/v8q9XGFa6q5Ap4Z/OhNkAMBaK5YeuEzwJt+NZdhiE=
6060
github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81/go.mod h1:siLfyv2c92W1eN/R4QqG/+RjjX5W2+gCTRjZxBjI3TY=
61-
github.com/dolthub/vitess v0.0.0-20240919225659-2ad81685e772 h1:vDwBX7Lc8DnA8Zk0iRIu6slCw0GIUfYfFlYDYJQw8GQ=
62-
github.com/dolthub/vitess v0.0.0-20240919225659-2ad81685e772/go.mod h1:uBvlRluuL+SbEWTCZ68o0xvsdYZER3CEG/35INdzfJM=
63-
github.com/dolthub/vitess v0.0.0-20241002230050-2c2ea65cf324 h1:OO1XBXmBM3HBJfbwEwsj8h0m/bwYKIgFgGN8d+S+vrw=
64-
github.com/dolthub/vitess v0.0.0-20241002230050-2c2ea65cf324/go.mod h1:uBvlRluuL+SbEWTCZ68o0xvsdYZER3CEG/35INdzfJM=
61+
github.com/dolthub/vitess v0.0.0-20241008184010-3e1d9e5061c3 h1:WCGxKjeAlF7l7FVIerUTEiDTbfDnhCxGJIDYb82euBM=
62+
github.com/dolthub/vitess v0.0.0-20241008184010-3e1d9e5061c3/go.mod h1:uBvlRluuL+SbEWTCZ68o0xvsdYZER3CEG/35INdzfJM=
6563
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
6664
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
6765
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=

sql/planbuilder/create_ddl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (b *Builder) buildCreateProcedure(inScope *scope, subQuery string, fullQuer
143143
err := fmt.Errorf("unknown procedure parameter direction: `%s`", string(param.Direction))
144144
b.handleErr(err)
145145
}
146-
internalTyp, err := types.ColumnTypeToType(&param.Type)
146+
internalTyp, err := types.ColumnTypeToType(param.Type)
147147
if err != nil {
148148
b.handleErr(err)
149149
}

sql/planbuilder/ddl.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ func (b *Builder) jsonTableSpecToSchemaHelper(jsonTableSpec *ast.JSONTableSpec,
12991299
b.jsonTableSpecToSchemaHelper(cd.Spec, sch)
13001300
continue
13011301
}
1302-
typ, err := types.ColumnTypeToType(&cd.Type)
1302+
typ, err := types.ColumnTypeToType(cd.Type)
13031303
if err != nil {
13041304
b.handleErr(err)
13051305
}
@@ -1362,7 +1362,7 @@ func getPkOrdinals(ts *ast.TableSpec) []int {
13621362
// columnDefinitionToColumn returns the sql.Column for the column definition given, as part of a create table
13631363
// statement. Defaults and generated expressions must be handled separately.
13641364
func (b *Builder) columnDefinitionToColumn(inScope *scope, cd *ast.ColumnDefinition, indexes []*ast.IndexDefinition) *sql.Column {
1365-
internalTyp, err := types.ColumnTypeToType(&cd.Type)
1365+
internalTyp, err := types.ColumnTypeToType(cd.Type)
13661366
if err != nil {
13671367
b.handleErr(err)
13681368
}
@@ -1703,7 +1703,7 @@ func ParseColumnTypeString(columnType string) (sql.Type, error) {
17031703
return nil, fmt.Errorf("failed to parse type info for column: %s", columnType)
17041704
}
17051705
parsedTyp := ddl.TableSpec.Columns[0].Type
1706-
typ, err := types.ColumnTypeToType(&parsedTyp)
1706+
typ, err := types.ColumnTypeToType(parsedTyp)
17071707
if err != nil {
17081708
return nil, err
17091709
}

sql/planbuilder/from.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ func (b *Builder) buildJSONTableCols(inScope *scope, jtSpec *ast.JSONTableSpec)
541541
continue
542542
}
543543

544-
typ, err := types.ColumnTypeToType(&jtColDef.Type)
544+
typ, err := types.ColumnTypeToType(jtColDef.Type)
545545
if err != nil {
546546
b.handleErr(err)
547547
}

sql/planbuilder/proc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func (b *Builder) buildDeclareVariables(inScope *scope, d *ast.Declare) (outScop
312312
outScope = inScope.push()
313313
dVars := d.Variables
314314
names := make([]string, len(dVars.Names))
315-
typ, err := types.ColumnTypeToType(&dVars.VarType)
315+
typ, err := types.ColumnTypeToType(dVars.VarType)
316316
if err != nil {
317317
err := err
318318
b.handleErr(err)

sql/planbuilder/scalar.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,9 @@ func (b *Builder) convertInt(value string, base int) *expression.Literal {
837837
}
838838

839839
func (b *Builder) ConvertVal(v *ast.SQLVal) sql.Expression {
840+
if v == nil {
841+
return nil
842+
}
840843
switch v.Type {
841844
case ast.StrVal:
842845
return expression.NewLiteral(string(v.Val), types.CreateLongText(b.ctx.GetCollation()))

sql/planbuilder/select.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (b *Builder) buildSelect(inScope *scope, s *ast.Select) (outScope *scope) {
107107
b.buildProjection(outScope, projScope)
108108
outScope = projScope
109109

110-
b.buildDistinct(outScope, s.QueryOpts.Distinct)
110+
b.buildDistinct(outScope, s.QueryOpts)
111111

112112
// OFFSET and LIMIT are last
113113
offset := b.buildOffset(outScope, s.Limit)
@@ -117,7 +117,9 @@ func (b *Builder) buildSelect(inScope *scope, s *ast.Select) (outScope *scope) {
117117
limit := b.buildLimit(outScope, s.Limit)
118118
if limit != nil {
119119
l := plan.NewLimit(limit, outScope.node)
120-
l.CalcFoundRows = s.QueryOpts.SQLCalcFoundRows
120+
if s.QueryOpts != nil {
121+
l.CalcFoundRows = s.QueryOpts.SQLCalcFoundRows
122+
}
121123
outScope.node = l
122124
}
123125

@@ -194,8 +196,8 @@ func (b *Builder) typeCoerceLiteral(e sql.Expression) sql.Expression {
194196

195197
// buildDistinct creates a new plan.Distinct node if the query has a DISTINCT option.
196198
// If the query has both DISTINCT and ALL, an error is returned.
197-
func (b *Builder) buildDistinct(inScope *scope, distinct bool) {
198-
if distinct {
199+
func (b *Builder) buildDistinct(inScope *scope, qo *ast.QueryOpts) {
200+
if qo != nil && qo.Distinct {
199201
inScope.node = plan.NewDistinct(inScope.node)
200202
}
201203
}

0 commit comments

Comments
 (0)