topn and limit should be fully pushed down to tiflash
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
currently topn and limit can not be fully pushed down to tiflash, it still depend on root final partial one to do the collection work. But actually it may work since the similar window operator has already been fully pushed down due to the middle passThrough.
ref:

the middle passThrough also works for topn and limit being fully pushed down to tiflash. And then, those check below can be eliminated.

Contributor guide
Research direction
Start by comparing the existing fully pushed-down window operator with TopN and Limit, focusing on the middle passThrough behavior described in the issue. Trace the checks that currently prevent full TiFlash pushdown and confirm the expected behavior with relevant planner or integration tests; done means TopN and Limit no longer rely on the root final partial operator for collection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100