Some predicates should not be removed after partition pruning #33966
Labels
affects-5.0
This bug affects 5.0.x versions.
affects-5.1
This bug affects 5.1.x versions.
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects 5.4.x versions.
affects-6.0
affects-6.1
component/tablepartition
This issue is related to Table Partition of TiDB.
sig/planner
SIG: Planner
type/enhancement
The issue or PR belongs to an enhancement.
Enhancement
Related to #22079
We will prune some partitions based on the predicate conditions and the predicate conditions will be removed when we use the static mode.
But some predicate conditions are required to generate a range for index access and cannot be eliminated.
For example:
The plan is
But the expected plan is
Because the predicate
a = 202103
has been removed, it can not use to build the index range.The text was updated successfully, but these errors were encountered: