Skip to content

Commit f83e931

Browse files
committed
Revert "make equals in antijoins from not exists null safe"
This reverts commit c036970.
1 parent c036970 commit f83e931

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

sql/analyzer/unnest_exists_subqueries.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,6 @@ func unnestExistSubqueries(ctx *sql.Context, scope *plan.Scope, a *Analyzer, fil
209209

210210
switch joinType {
211211
case plan.JoinTypeAnti:
212-
outerFilters, _, err = transform.Exprs(outerFilters, func(e sql.Expression) (sql.Expression, transform.TreeIdentity, error) {
213-
if equals, ok := e.(*expression.Equals); ok {
214-
return equals.MakeNullSafe(), transform.NewTree, nil
215-
}
216-
return e, transform.SameTree, nil
217-
})
218-
if err != nil {
219-
return nil, transform.SameTree, err
220-
}
221212
ret = plan.NewAntiJoin(ret, s.inner, expression.JoinAnd(outerFilters...)).WithComment(comment)
222213
qFlags.Set(sql.QFlagInnerJoin)
223214
case plan.JoinTypeSemi:

sql/expression/comparison.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,6 @@ func (e *Equals) ToComparer() (Comparer, error) {
408408
return e, nil
409409
}
410410

411-
// MakeNullSafe returns a new NullSafeEquals with the same children
412-
func (e *Equals) MakeNullSafe() *NullSafeEquals {
413-
return NewNullSafeEquals(e.LeftChild, e.RightChild)
414-
}
415-
416411
// NullSafeEquals is a comparison that checks an expression is equal to
417412
// another, where NULLs do not coalesce to NULL and two NULLs compare equal to
418413
// each other.

0 commit comments

Comments
 (0)