opensearch-project / sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
https://opensearch.org/docs/latest/search-plugins/sql/index/
Apache License 2.0
120 stars 139 forks source link

[BUG] PPL head limit and SQL limit offset throw exception #3102

Open penghuo opened 3 weeks ago

penghuo commented 3 weeks ago

What is the bug?

###
POST {{baseUrl}}/_plugins/_ppl
Content-Type: application/x-ndjson

{
  "query": "source = people"
}

###
POST {{baseUrl}}/_plugins/_ppl/_explain
Content-Type: application/x-ndjson

{
  "query": "source = people | head 1 from 1"
}

How can one reproduce the bug?

###
PUT {{baseUrl}}/_plugins/_query/settings
Content-Type: application/x-ndjson

{
  "transient" : {
    "plugins.query.size_limit" : 1
  }
}

###
PUT {{baseUrl}}/people/_settings
Content-Type: application/x-ndjson

{
  "index": {
    "max_result_window": 1
  }
}

What is the expected behavior? No exception.

dblock commented 1 week ago

[Catch All Triage - 1, 2, 3, 4]