diff --git a/go.mod b/go.mod index d98ca41461..6b0eb8a58e 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/dolthub/dolt/go v0.40.5-0.20260615194251-a16fe3baf64b github.com/dolthub/eventsapi_schema v0.0.0-20260310172945-37a9265ade69 github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-mysql-server v0.20.1-0.20260615190047-8d437133a8e6 + github.com/dolthub/go-mysql-server v0.20.1-0.20260618182550-6dc22b93e5b7 github.com/dolthub/pg_query_go/v6 v6.0.0-20251215122834-fb20be4254d1 github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216 github.com/dolthub/vitess v0.0.0-20260604210335-0893abc80542 diff --git a/go.sum b/go.sum index 02d93b0236..73201c1970 100644 --- a/go.sum +++ b/go.sum @@ -256,8 +256,8 @@ github.com/dolthub/fslock v0.0.5 h1:QoXhBhgY1oumHE26qyE7tgmXUT8qjJwxsIzo54O/B/k= github.com/dolthub/fslock v0.0.5/go.mod h1:sdofYYqE0D79zNZyB4/kmlnsQOVap1C2yByjGKSirEM= 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.20260615190047-8d437133a8e6 h1:YvXG44Qdm6NtAHVmC00R+AkogoWTpRppq+FxezrysjM= -github.com/dolthub/go-mysql-server v0.20.1-0.20260615190047-8d437133a8e6/go.mod h1:Q6+pUrFqO9ElSVu02xmSEzdcToXLVqRU+hZYcAa04wU= +github.com/dolthub/go-mysql-server v0.20.1-0.20260618182550-6dc22b93e5b7 h1:9ZykaFLtaqSTg1ylqr/VivLD+cUnpOUtXviMTzlBJmc= +github.com/dolthub/go-mysql-server v0.20.1-0.20260618182550-6dc22b93e5b7/go.mod h1:Q6+pUrFqO9ElSVu02xmSEzdcToXLVqRU+hZYcAa04wU= 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= diff --git a/testing/go/index_test.go b/testing/go/index_test.go index e5e7c48064..3e58f11dd9 100644 --- a/testing/go/index_test.go +++ b/testing/go/index_test.go @@ -285,11 +285,13 @@ func TestBasicIndexing(t *testing.T) { Query: "explain select * from test join jointable on test.v1 = jointable.v3 and test.v2 = 22 order by 1", Expected: []sql.Row{ {"InnerJoin"}, - {" ├─ (test.v1 = jointable.v3 AND test.v2 = 22)"}, - {" ├─ IndexedTableAccess(test)"}, - {" │ ├─ index: [test.pk]"}, - {" │ ├─ filters: [{[NULL, ∞)}]"}, - {" │ └─ columns: [pk v1 v2]"}, + {" ├─ test.v1 = jointable.v3"}, + {" ├─ Filter"}, + {" │ ├─ test.v2 = 22"}, + {" │ └─ IndexedTableAccess(test)"}, + {" │ ├─ index: [test.pk]"}, + {" │ ├─ filters: [{[NULL, ∞)}]"}, + {" │ └─ columns: [pk v1 v2]"}, {" └─ Table"}, {" ├─ name: jointable"}, {" └─ columns: [v3 v4]"}, @@ -395,6 +397,9 @@ func TestBasicIndexing(t *testing.T) { }, }, { + // TODO: Unskip once matched filter expressions are removed from filter nodes + // https://github.com/dolthub/dolt/issues/11231 + Skip: true, Query: "explain select /*+ lookup_join(jointable, test) */ HINT * from test join jointable on test.v1 = jointable.v3 and test.v2 = 22 order by 1", Expected: []sql.Row{ {"Project"}, @@ -459,11 +464,13 @@ func TestBasicIndexing(t *testing.T) { Query: "explain select * from test join jointable on test.v1 = jointable.v3 and test.v2 = 22 order by 1", Expected: []sql.Row{ {"InnerJoin"}, - {" ├─ (test.v1 = jointable.v3 AND test.v2 = 22)"}, - {" ├─ IndexedTableAccess(test)"}, - {" │ ├─ index: [test.pk]"}, - {" │ ├─ filters: [{[NULL, ∞)}]"}, - {" │ └─ columns: [pk v1 v2]"}, + {" ├─ test.v1 = jointable.v3"}, + {" ├─ Filter"}, + {" │ ├─ test.v2 = 22"}, + {" │ └─ IndexedTableAccess(test)"}, + {" │ ├─ index: [test.pk]"}, + {" │ ├─ filters: [{[NULL, ∞)}]"}, + {" │ └─ columns: [pk v1 v2]"}, {" └─ Table"}, {" ├─ name: jointable"}, {" └─ columns: [v3 v4]"}, diff --git a/testing/go/pgcatalog_test.go b/testing/go/pgcatalog_test.go index 1eecaf5fef..2b68654181 100644 --- a/testing/go/pgcatalog_test.go +++ b/testing/go/pgcatalog_test.go @@ -5191,6 +5191,8 @@ ORDER BY 1,2;`, }, }, { + // TODO: The `c.relname = 't2'` filter expression is matched in the IndexedTableAccess and should be + // removed from the filter node https://github.com/dolthub/dolt/issues/11231 Query: `EXPLAIN SELECT c.relname, a.attname FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a @@ -5204,14 +5206,18 @@ ORDER BY 1,2;`, {" ├─ columns: [c.relname, a.attname]"}, {" └─ Sort(c.relname ASC, a.attname ASC)"}, {" └─ LookupJoin"}, - {" ├─ (((c.relkind = 'r' AND a.attnum > 0) AND (NOT(a.attisdropped))) AND c.relname = 't2')"}, - {" ├─ TableAlias(a)"}, - {" │ └─ Table"}, - {" │ └─ name: pg_attribute"}, - {" └─ TableAlias(c)"}, - {" └─ IndexedTableAccess(pg_class)"}, - {" ├─ index: [pg_class.oid]"}, - {" └─ keys: a.attrelid"}, + {" ├─ Filter"}, + {" │ ├─ (c.relkind = 'r' AND c.relname = 't2')"}, + {" │ └─ TableAlias(c)"}, + {" │ └─ IndexedTableAccess(pg_class)"}, + {" │ ├─ index: [pg_class.relname,pg_class.relnamespace]"}, + {" │ └─ filters: [{[t2, t2], [NULL, ∞)}]"}, + {" └─ Filter"}, + {" ├─ (a.attnum > 0 AND (NOT(a.attisdropped)))"}, + {" └─ TableAlias(a)"}, + {" └─ IndexedTableAccess(pg_attribute)"}, + {" ├─ index: [pg_attribute.attrelid,pg_attribute.attname]"}, + {" └─ keys: c.oid"}, }, }, },