pingcap / pingcap/tidb

`PhysicalLimit` should always be pushed down when possible

Open
#39,839 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.