]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/radosgw/s3select: add SQL LIMIT operator examples 67182/head
authorKhushhal <Khushhalsinha0909@gmail.com>
Tue, 3 Feb 2026 12:58:38 +0000 (18:28 +0530)
committerKhushhal <Khushhalsinha0909@gmail.com>
Wed, 4 Feb 2026 05:59:37 +0000 (11:29 +0530)
This commit adds concrete examples for the SQL LIMIT operator section,
demonstrating both non-aggregation queries (retrieving first N rows)
and aggregation queries with row processing limits.

Signed-off-by: Khushhal <Khushhalsinha0909@gmail.com>
doc/radosgw/s3select: fix RST formatting in LIMIT examples

- Add empty line before example section for proper paragraph separation
- Wrap lines at 80 characters maximum for consistency
- Add empty line after final paragraph

Signed-off-by: Khushhal <Khushhalsinha0909@gmail.com>
doc/radosgw/s3select.rst

index 8fdcab2631a78c91ba3240c095450b237e2b9336..cf829c6386a79afda5db72c609ab1abd20ced8be 100644 (file)
@@ -428,9 +428,26 @@ trims leading/trailing(or both) characters from target string, the default is bl
 SQL Limit Operator
 ~~~~~~~~~~~~~~~~~~
 
-The SQL LIMIT operator is used to limit the number of rows processed by the query.
-Upon reaching the limit set by the user, the RGW stops fetching additional chunks.
-TODO : add examples, for aggregation and non-aggregation queries.
+The SQL LIMIT operator is used to limit the number of rows processed by the
+query. Upon reaching the limit set by the user, the RGW stops fetching
+additional chunks.
+
+**Non-aggregation example** (retrieve first 10 rows):
+
+.. code-block:: sql
+
+    SELECT _1, _2, _3 FROM s3object LIMIT 10
+
+This query returns the first 10 rows from the object without any aggregation.
+
+**Aggregation example** (count with limit on processing):
+
+.. code-block:: sql
+
+    SELECT COUNT(*), SUM(CAST(_1 AS INT)) FROM s3object LIMIT 100
+
+This query aggregates data but stops processing after 100 rows, returning the
+count and sum of column 1 for those rows.
 
 Alias
 ~~~~~