[FEATURE] Expose total matched row count in PPL query response
Maintainer thường phản hồi trong vòng 1 ngày
@ahkcs đang làm issue này rồi.
Từ ngày 20/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start by tracing how PPL query results and response metadata are built, then compare that path with the Query DSL response's total-hit handling. The issue does not name files or tests, so first locate the PPL response entry point and its tests. Done means the response exposes total matched rows separately from returned rows, with coverage for capped results.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem?
A PPL query response reports only the rows it returns — the result's total and its row count are always the same. There is no way for a client to tell whether more rows matched than were returned.
This becomes a problem when a consumer caps the output. In the OpenSearch MCP server, PPLQueryTool now limits returned rows (by appending | head <size>) to avoid flooding an LLM's context window — see opensearch-mcp-server-py#327. The LLM knows the size cap it requested, but it has no signal that the underlying query matched more rows, so it cannot make an informed decision about whether to widen the request. The investigation can silently proceed on a partial view.
Query DSL does not have this gap: a _search response returns hits.total.value, which acts as a hint that the returned hits are a partial slice of a larger match. PPL has no equivalent.
What solution would you like?
Have the PPL response carry the total number of matched rows as a distinct value from the number of rows returned — for example in the response metadata or a dedicated field — so a client can detect that a result was truncated and decide whether to fetch more. This mirrors the role hits.total.value plays for Query DSL.
What alternatives have you considered?
- Running a separate
... | stats count()query to get the total. This doubles the round-trips and cost, and the two queries can race against ongoing writes. - Relying on the client/LLM to always request a large enough size. This defeats the purpose of capping output and still gives no truncation signal.
Do you have any additional context?
Downstream consumer: opensearch-mcp-server-py#327 (PPLQueryTool size cap). Reviewer feedback on that PR raised that a capped PPL result gives the LLM no way to know more data exists, unlike Query DSL's total hits — which is what motivated this request.
- Ngôn ngữ chính
- Java
- Star
- 176
- Fork
- 237
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 34
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của opensearch-project/sql
-
bug untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
opensearch-project/sql#5990 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug untriaged
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
opensearch-project/sql#5983 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] PromQL queries fail with InvalidTypeIdException when metric has a label named "type"Có thể đã có người làm @nagendramohan đã nhận 107 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
opensearch-project/sql#5684 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[DOC] Calcite settings documentation missing examplesCó thể đã có người làm @AzazelSensei đã nhận 64 ngày trước. Đang mởdocumentation PPL
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
opensearch-project/sql#4806 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
calcite enhancement Meta performance PPL untriaged
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
opensearch-project/sql#5991 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của opensearch-project/sql
Issue tương tự
-
NeoForge 安装任务的子任务描述有误Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
PCL-Community/PCL-CE#3907 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 2 ngày
-
area/dependencies area/dependencies/quarkus backport/26.6 backport/26.8 kind/cve severity/critical source/scan-dependencies status/triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
docker-to-squash.py: check_dependencies should find mksquashfs on PATHCó thể đã có người làm @linzch3 đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
chore
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
lugassawan/swe-workbench#841 ·