v.22.11Improvement

Trivial queries with small LIMIT correctly estimate row counts to check thresholds

Trivial queries with small LIMIT will properly determine the number of estimated rows to read, so that the threshold will be checked properly. Closes #7071. #42580 (Han Fei).
Improved estimation of rows to read for trivial queries with small LIMIT, ensuring proper application of row threshold checks.

Why it matters

This feature addresses inaccurate row read estimations in trivial queries that use a small LIMIT, which previously caused incorrect threshold checks. By accurately estimating the number of rows to read, it ensures that thresholds are applied correctly, improving query reliability and resource management.

How to use it

No special configuration is required. Queries with small LIMIT values will automatically benefit from improved row read estimation and correct threshold enforcement.