`PhysicalLimit` should always be pushed down when possible
Open
severity/minor
sig/planner
type/bug
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
In `pushLimitOrTopNForcibly`, we only checked the logical operator, but it's possible that a `PhysicalLimit` is from a `LogicalTopN`.
In this case, the `PhysicalLimit` would not be forced to be pushed down, which is not expected.
Ref: https://github.com/pingcap/tidb/pull/26550
Contributor guide
Assessment
This issue has not been assessed yet.