-
Notifications
You must be signed in to change notification settings - Fork 190
[BUG] Non-paginated results returned silently if query not supported by cursor #78
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Describe the bug
If the query is not supported by cursor to paginate, such as GROUP BY, full result set is returned silently instead of error with clear message.
To Reproduce
- Create any index
- Enable cursor setting manually or merge PR Remove cursor enabling and fetch size setting #75
- Run a GROUP BY query
- See the empty response as below
curl -H 'Content-Type: application/json' -XPOST "http://localhost:9200/_plugins/_sql" -d'
{
"query": "SELECT state.keyword, count(1) FROM accounts GROUP BY state",
"fetch_size": 10
}'
{
"schema": [
{
"name": "state.keyword",
"type": "double"
},
{
"name": "COUNT(1)",
"type": "double"
}
],
"total": 51,
"datarows": [
[
"TX",
0
],
[
"MD",
0
],
[
"ID",
......
],
"size": 51,
"status": 200
}
Expected behavior
Expect an error thrown with clear message saying that the type of query is not supported for pagination yet.
Host/Environment (please complete the following information):
- OS: [e.g. iOS] Mac
- Version [e.g. 22] OpenSearch beta-1 (or current develop branch)
Reactions are currently unavailable