@@ -26,6 +26,10 @@ import (
2626 "github.com/dolthub/go-mysql-server/sql/plan"
2727)
2828
29+ // SplitConjunction is a pseudo-extension point of expression.SplitConjunction, used to alter the logic
30+ // for different integrators.
31+ var SplitConjunction func (expr sql.Expression ) []sql.Expression = expression .SplitConjunction
32+
2933// joinOrderBuilder enumerates valid plans for a join tree. We build the join
3034// tree bottom up, first joining single nodes with join condition "edges", then
3135// single nodes to hypernodes (1+n), and finally hyper nodes to
@@ -510,7 +514,7 @@ func (j *joinOrderBuilder) buildJoinOp(n *plan.JoinNode) *ExprGroup {
510514 rightEdges : rightE ,
511515 }
512516
513- filters := expression . SplitConjunction (n .JoinCond ())
517+ filters := SplitConjunction (n .JoinCond ())
514518 j .m .Tracer .Log ("Join filters: %v" , filters )
515519 union := leftV .union (rightV )
516520 group , ok := j .plans [union ]
@@ -538,7 +542,7 @@ func (j *joinOrderBuilder) buildFilter(child sql.Node, e sql.Expression) (vertex
538542 // memoize child
539543 childV , childE , childGrp := j .populateSubgraph (child )
540544
541- filterGrp := j .m .MemoizeFilter (nil , childGrp , expression . SplitConjunction (e ))
545+ filterGrp := j .m .MemoizeFilter (nil , childGrp , SplitConjunction (e ))
542546
543547 // filter will absorb child relation for join reordering
544548 j .plans [childV ] = filterGrp
0 commit comments