Skip to content

fix: OpenSearch-3.x SQL stopped supporting DSL-format SQL JSON#2876

Merged
davidsbatista merged 7 commits intomainfrom
fix/OpenSearch-format-json-no-longer-supported
Feb 26, 2026
Merged

fix: OpenSearch-3.x SQL stopped supporting DSL-format SQL JSON#2876
davidsbatista merged 7 commits intomainfrom
fix/OpenSearch-format-json-no-longer-supported

Conversation

@davidsbatista
Copy link
Copy Markdown
Contributor

@davidsbatista davidsbatista commented Feb 25, 2026

Related Issues

Proposed Changes:

  • The new OpenSearch changed since 3.x onwards.
  • SQL responses are still JSON, but no longer the legacy DSL-shaped JSON (i.e.: with hits, _shards, aggregations) returned via format=json in 2.x.
  • Updated the OpenSearch SQL integration tests to use a docker with OpenSearch 3.5.
  • Updated tests to validate the tabular SQL JSON format (schema, datarows, size, status, optional cursor).

How did you test it?

  • updated all the SQL-related tests (both sync and async) to assert for a different output, still JSON, just no longer in a DSL-shaped format

Notes for the reviewer

  • Our OpenSearchDocumentStore will still work with OpenSearch 2.x, the only change was in the sql_query method where the params = {"format": "json"} was removed.
  • Both run() and run_async() from the OpenSearchSQLRetriever just return the result from the SQL call, so there's no breaking changes introduced

Checklist

@github-actions github-actions Bot added integration:opensearch type:documentation Improvements or additions to documentation labels Feb 25, 2026
@davidsbatista davidsbatista marked this pull request as ready for review February 25, 2026 14:37
@davidsbatista davidsbatista requested a review from a team as a code owner February 25, 2026 14:37
@davidsbatista davidsbatista requested review from anakin87 and removed request for a team February 25, 2026 14:37
Comment thread integrations/opensearch/tests/conftest.py
Comment thread integrations/opensearch/tests/test_document_store.py
Copy link
Copy Markdown
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@davidsbatista davidsbatista merged commit c8a60e1 into main Feb 26, 2026
7 checks passed
@davidsbatista davidsbatista deleted the fix/OpenSearch-format-json-no-longer-supported branch February 26, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:opensearch type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants