[FEATURE] Expose total matched row count in PPL query response
I maintainer di solito rispondono entro 1 giorno
@ahkcs ci sta già lavorando.
Dal 20/10/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 176
- Fork
- 237
- Merge medio
- 2g 12h
- PR unite (30g)
- 34
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opensearch-project/sql
-
bug untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opensearch-project/sql#5990 ·
I maintainer di solito rispondono entro 1 giorno
-
bug untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
opensearch-project/sql#5983 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] PromQL queries fail with InvalidTypeIdException when metric has a label named "type"Forse già presa @nagendramohan l’ha presa 107 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
opensearch-project/sql#5684 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[DOC] Calcite settings documentation missing examplesForse già presa @AzazelSensei l’ha presa 64 giorni fa. Apertadocumentation PPL
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opensearch-project/sql#4806 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
calcite enhancement Meta performance PPL untriaged
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
opensearch-project/sql#5991 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di opensearch-project/sql
Issue simili
-
NeoForge 安装任务的子任务描述有误Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
PCL-Community/PCL-CE#3907 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 2 giorni
-
area/dependencies area/dependencies/quarkus backport/26.6 backport/26.8 kind/cve severity/critical source/scan-dependencies status/triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
docker-to-squash.py: check_dependencies should find mksquashfs on PATHForse già presa @linzch3 l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
chore
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
lugassawan/swe-workbench#841 ·