Location: go/vt/vtgate/planbuilder/operators/predicates/predicate.go:29
During query planning, join predicates need to be split and pushed down early to compute accurate routing costs. However, if routes later merge, we need to restore the original predicate. This creates a tension:
- Early planning:
a.col = b.colmust become:bv1 = b.colon RHS (witha.colas a bind variable from LHS) - Route merging: If both sides merge under one route, we need
a.col = b.colback