From 0359bbcf434fd14d0a4654f35103005de875c7d1 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Sun, 28 Apr 2024 12:05:57 +0800 Subject: [PATCH] executor: Fix index join hash produces redundant rows for left outer anti semi join type (#52908) (#52924) close pingcap/tidb#52902 --- pkg/executor/index_lookup_hash_join.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/executor/index_lookup_hash_join.go b/pkg/executor/index_lookup_hash_join.go index 1a520570106de..9f1d7a94927b7 100644 --- a/pkg/executor/index_lookup_hash_join.go +++ b/pkg/executor/index_lookup_hash_join.go @@ -28,7 +28,6 @@ import ( "github.com/pingcap/failpoint" "github.com/pingcap/tidb/pkg/executor/internal/exec" "github.com/pingcap/tidb/pkg/expression" - plannercore "github.com/pingcap/tidb/pkg/planner/core" "github.com/pingcap/tidb/pkg/types" "github.com/pingcap/tidb/pkg/util" "github.com/pingcap/tidb/pkg/util/channel" @@ -735,7 +734,7 @@ func (iw *indexHashJoinInnerWorker) getMatchedOuterRows(innerRow chunk.Row, task return nil, nil, nil } joinType := JoinerType(iw.joiner) - isSemiJoin := joinType == plannercore.SemiJoin || joinType == plannercore.LeftOuterSemiJoin + isSemiJoin := joinType.IsSemiJoin() matchedRows = make([]chunk.Row, 0, len(iw.matchedOuterPtrs)) matchedRowPtr = make([]chunk.RowPtr, 0, len(iw.matchedOuterPtrs)) for _, ptr := range iw.matchedOuterPtrs {