use SEMI_JOIN_REWRITE to control the exists/in's behavior #35323
Closed
Description
Enhancement
Previously, we have the session variable tidb_opt_insubq_to_join_and_agg
to control the in subquery's behavior. But the variable is not very suitable for SPM.
And that variable only controls the IN subquery. It doesn't handle the EXISTS because we need to decorrelated first then check whether we can rewrite the semi join.
This time, we introduce the hint to control its behavior.