Commit 16ce7e8
authored
limit for aggregations (#201)
### TL;DR
Added pagination support to the ClickHouse aggregation queries.
### What changed?
Added a LIMIT and OFFSET clause to the GetAggregations method in the ClickHouseConnector. The implementation:
- Adds LIMIT and OFFSET when both page and limit are specified
- Adds only LIMIT when just the limit is specified
- Calculates the correct offset based on page number and limit
### How to test?
1. Make a query to the API that uses the GetAggregations method with pagination parameters
2. Verify that the query returns the correct number of results based on the limit
3. Test with different page numbers to ensure proper pagination
4. Verify that queries without pagination parameters still work correctly
### Why make this change?
This change enables proper pagination for aggregation queries, which is essential for handling large result sets efficiently. Without pagination, large query results could cause performance issues or timeout errors. This implementation allows clients to request specific pages of results with a defined size limit.1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
507 | 515 | | |
508 | 516 | | |
509 | 517 | | |
| |||
0 commit comments