v.25.10New Feature

Add support for negative LIMIT and negative OFFSET

Add support for negative LIMIT and negative OFFSET. Closes #28913. #88411 (Nihal Z. Miaji).
Add support for negative values in LIMIT and OFFSET clauses in ClickHouse queries.

Why it matters

This feature allows users to specify negative LIMIT and OFFSET values to simplify result navigation and filtering, addressing use cases where counting rows from the end is needed and improving query flexibility.

How to use it

Users can now use negative numbers directly in LIMIT and OFFSET clauses, for example: SELECT * FROM table LIMIT -10 OFFSET -5. This will adjust the result set based on the new semantics of negative limits and offsets.