File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,7 +117,6 @@ func initEngine() {
117117 // There are a couple places during analysis where SplitConjunction in GMS cannot correctly split up
118118 // Doltgres expressions, so we need to override the default function used.
119119 analyzer .SplitConjunction = SplitConjunction
120- analyzer .CostedIndexScanExpressionWalker = & LogicTreeWalker {}
121120 memo .SplitConjunction = SplitConjunction
122121}
123122
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ package analyzer
1616
1717import (
1818 "github.com/dolthub/go-mysql-server/sql"
19- "github.com/dolthub/go-mysql-server/sql/analyzer"
2019 "github.com/dolthub/go-mysql-server/sql/expression"
2120
2221 pgexprs "github.com/dolthub/doltgresql/server/expression"
@@ -53,9 +52,9 @@ func SplitConjunction(expr sql.Expression) []sql.Expression {
5352// to apply indexes.
5453type LogicTreeWalker struct {}
5554
56- var _ analyzer. LogicTreeWalker = & LogicTreeWalker {}
55+ var _ sql. ExpressionTreeFilter = & LogicTreeWalker {}
5756
58- // Next implements the analyzer.LogicTreeWalker interface.
57+ // Next implements the sql.ExpressionTreeFilter interface.
5958func (l * LogicTreeWalker ) Next (e sql.Expression ) sql.Expression {
6059 switch expr := e .(type ) {
6160 case * pgexprs.GMSCast :
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
1818 "github.com/cockroachdb/errors"
1919 doltservercfg "github.com/dolthub/dolt/go/libraries/doltcore/servercfg"
2020 "github.com/dolthub/dolt/go/libraries/utils/filesys"
21+ "github.com/dolthub/doltgresql/server/analyzer"
2122 "github.com/dolthub/go-mysql-server/sql"
2223 "gopkg.in/yaml.v2"
2324
@@ -43,7 +44,8 @@ func (*DoltgresConfig) Overrides() sql.EngineOverrides {
4344 ParseTableAsColumn : expression .NewTableToComposite ,
4445 Parser : pgsql .NewPostgresParser (),
4546 },
46- SchemaFormatter : pgsql .NewPostgresSchemaFormatter (),
47+ SchemaFormatter : pgsql .NewPostgresSchemaFormatter (),
48+ CostedIndexScanExpressionFilter : & analyzer.LogicTreeWalker {},
4749 }
4850}
4951
You can’t perform that action at this time.
0 commit comments