Skip to content

Commit

Permalink
planner: improve code for friendly debug (#54451)
Browse files Browse the repository at this point in the history
ref #54401
  • Loading branch information
hawkingrei authored Jul 4, 2024
1 parent 4324414 commit df78562
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/planner/core/exhaust_physical_plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,10 @@ func (p *LogicalJoin) getHashJoins(prop *property.PhysicalProperty) (joins []bas
}

forced = (p.PreferJoinType&h.PreferHashJoin > 0) || forceLeftToBuild || forceRightToBuild
if !forced && p.shouldSkipHashJoin() {
shouldSkipHashJoin := p.shouldSkipHashJoin()
if !forced && shouldSkipHashJoin {
return nil, false
} else if forced && p.shouldSkipHashJoin() {
} else if forced && shouldSkipHashJoin {
p.SCtx().GetSessionVars().StmtCtx.SetHintWarning(
"A conflict between the HASH_JOIN hint and the NO_HASH_JOIN hint, " +
"or the tidb_opt_enable_hash_join system variable, the HASH_JOIN hint will take precedence.")
Expand Down

0 comments on commit df78562

Please sign in to comment.