diff --git a/enginetest/enginetests.go b/enginetest/enginetests.go index 170d9af86a..2dbcf7c84a 100644 --- a/enginetest/enginetests.go +++ b/enginetest/enginetests.go @@ -657,7 +657,7 @@ func TestOrderByGroupBy(t *testing.T, harness Harness) { _, rowIter, _, err = e.Query(ctx, "select any_value(id), team from members group by team order by id") require.NoError(t, err) rowCount = 0 - isServerTest := IsServerEngine(e) + for { row, err = rowIter.Next(ctx) if err == io.EOF { @@ -666,13 +666,14 @@ func TestOrderByGroupBy(t *testing.T, harness Harness) { rowCount++ require.NoError(t, err) - // TODO: needs fix to match MySQL, which its type is `LONG` = Int32 - // currently, we convert any int result to SQL int64 type before sending it over the wire var val int64 - if isServerTest { - val = row[0].(int64) - } else { - val = int64(row[0].(int32)) + switch v := row[0].(type) { + case int64: + val = v + case int32: + val = int64(v) + default: + panic(fmt.Sprintf("unexpected type %T", v)) } team := row[1].(string) @@ -701,13 +702,14 @@ func TestOrderByGroupBy(t *testing.T, harness Harness) { rowCount++ require.NoError(t, err) - // TODO: needs fix to match MySQL, which its type is `LONG` = Int32 - // currently, we convert any int result to SQL int64 type before sending it over the wire var val int64 - if isServerTest { - val = row[0].(int64) - } else { - val = int64(row[0].(int32)) + switch v := row[0].(type) { + case int64: + val = v + case int32: + val = int64(v) + default: + panic(fmt.Sprintf("unexpected type %T", v)) } team := row[1].(string) diff --git a/go.mod b/go.mod index d58d9737a7..4d1f10112b 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/dolthub/go-icu-regex v0.0.0-20240916130659-0118adc6b662 github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 - github.com/dolthub/vitess v0.0.0-20241016191424-d14e107a654e + github.com/dolthub/vitess v0.0.0-20241028204000-267861bc75a0 github.com/go-kit/kit v0.10.0 github.com/go-sql-driver/mysql v1.7.2-0.20231213112541-0004702b931d github.com/gocraft/dbr/v2 v2.7.2 diff --git a/go.sum b/go.sum index f7b17e8b1a..56fd29ccd5 100644 --- a/go.sum +++ b/go.sum @@ -58,12 +58,8 @@ github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 h1:bMGS25NWAGTE github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71/go.mod h1:2/2zjLQ/JOOSbbSboojeg+cAwcRV0fDLzIiWch/lhqI= github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 h1:7/v8q9XGFa6q5Ap4Z/OhNkAMBaK5YeuEzwJt+NZdhiE= github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81/go.mod h1:siLfyv2c92W1eN/R4QqG/+RjjX5W2+gCTRjZxBjI3TY= -github.com/dolthub/vitess v0.0.0-20241009160728-54c0746cbff7 h1:mepdzTqvr0ZAbyOEsdgLg/nJ2qQzLJIwHD7xityHzz4= -github.com/dolthub/vitess v0.0.0-20241009160728-54c0746cbff7/go.mod h1:uBvlRluuL+SbEWTCZ68o0xvsdYZER3CEG/35INdzfJM= -github.com/dolthub/vitess v0.0.0-20241010201417-9d4f54b29ccc h1:ZZgTRuxEwd3X67njtK30buHeZScLAd4W0rbRV8CORhE= -github.com/dolthub/vitess v0.0.0-20241010201417-9d4f54b29ccc/go.mod h1:uBvlRluuL+SbEWTCZ68o0xvsdYZER3CEG/35INdzfJM= -github.com/dolthub/vitess v0.0.0-20241016191424-d14e107a654e h1:Ssd/iV0hAOShAgr0c4pJQNgh2E4my2XHblFIIam0D+4= -github.com/dolthub/vitess v0.0.0-20241016191424-d14e107a654e/go.mod h1:uBvlRluuL+SbEWTCZ68o0xvsdYZER3CEG/35INdzfJM= +github.com/dolthub/vitess v0.0.0-20241028204000-267861bc75a0 h1:eeKypNsi1nQmjWxSAAWT6tvRsDWdmll03BozAUUIE4E= +github.com/dolthub/vitess v0.0.0-20241028204000-267861bc75a0/go.mod h1:uBvlRluuL+SbEWTCZ68o0xvsdYZER3CEG/35INdzfJM= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=