Query your data using familiar SQL or intuitive Piped Processing Language (PPL) https://opensearch.org/docs/latest/search-plugins/sql/index/
  • Java 96.8%
  • ANTLR 2.4%
  • Python 0.4%
  • JavaScript 0.3%
  • Shell 0.1%
Find a file
Kai Huang 70c9b00dbc
Cancel the searches of an async PPL job when it is cancelled (#6012)
DELETE /_plugins/_async_query/{id} only marked the query task cancelled. A
scan stops at its next page, but a search already running, such as an
aggregation, ran to the end after the client was told CANCELLED. The
submit's transport task has completed by then, so the task manager no
longer tracks it and cannot cancel its children; cancel them by their
parent task id instead, as _tasks/_cancel?parent_task_id= does.

Resolves #6004

Signed-off-by: Kai Huang <ahkcs@amazon.com>
2026-12-01 16:23:44 -08:00
.claude [BugFix] Fix chained streamstats with window causing NPE (#4800) (#5359) 2026-04-23 19:34:14 +08:00
.github Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
api [BugFix] Keep metadata fields hidden per input of append, appendpipe, appendcol, union and lookup (#5884) 2026-10-16 08:54:39 -07:00
async-query Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
async-query-core Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
benchmarks Fix O(cols^2) PPL result materialization on wide schemas (#5940) 2026-11-10 08:46:47 -08:00
buildSrc Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
common Run plugin owned index access as the plugin subject (#5838) 2026-11-23 13:37:15 -08:00
core [BugFix] Support cast of boolean to double and float in Calcite (#5987) (#5993) 2026-11-30 00:17:27 -08:00
datasources Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
direct-query Migrate to Jackson 3.x APIs (#5703) 2026-08-24 09:45:33 -07:00
direct-query-core Migrate to Jackson 3.x APIs (#5703) 2026-08-24 09:45:33 -07:00
docs [BugFix] Accept single values in mvindex and date/time values in split (#5948) (#5955) 2026-11-29 17:24:18 -08:00
doctest Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
gradle/wrapper chore: Bump Gradle wrapper to 9.4.1 and exclude @Ignore classes (#5414) 2026-05-06 21:37:46 -07:00
integ-test Fix duplicate project pushdown guard that never matched (#6008) 2026-12-01 10:38:13 -08:00
language-grammar Add SQL histogram and date_histogram bucket functions (#5700) 2026-08-20 16:44:59 -07:00
legacy [BugFix] Return 400 for an empty SQL cursor (#5983) (#5992) 2026-11-29 17:24:07 -08:00
opensearch Fix duplicate project pushdown guard that never matched (#6008) 2026-12-01 10:38:13 -08:00
plugin Cancel the searches of an async PPL job when it is cancelled (#6012) 2026-12-01 16:23:44 -08:00
ppl [BugFix] Support cast of boolean to double and float in Calcite (#5987) (#5993) 2026-11-30 00:17:27 -08:00
ppl-rest-spi Add a generic, extensible rest-endpoint provider SPI (#5656) 2026-08-04 09:11:39 -07:00
prometheus Migrate to Jackson 3.x APIs (#5703) 2026-08-24 09:45:33 -07:00
protocol [FEATURE] Async PPL query submission and result retrieval (#5832) 2026-10-06 18:46:37 -07:00
release-notes Add release notes for 3.10.1 (#5974) (#5976) 2026-11-23 22:04:03 -05:00
scripts Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
spark Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
sql [BugFix] Fix empty SQL query failing with internal NullPointerException (#5879) (#5880) 2026-10-15 14:32:28 -07:00
.codecov.yml [Infrastructure CI/CD]Count integration test coverage in Codecov (#5954) 2026-11-17 11:06:19 -08:00
.gitignore feat: complex query thread pool (#5628) 2026-07-28 09:18:57 -07:00
.licenserc.json Add SPDX license header checker and missing headers (#5725) 2026-11-30 13:10:26 -08:00
.lycheeignore fix lychee (#5451) 2026-06-24 10:48:37 -07:00
.pre-commit-config.yaml Spotless precommit: apply instead of check (#4320) 2025-09-17 16:22:08 -07:00
.whitesource Update mend config to allow remediation (#5287) 2026-03-30 12:17:53 -07:00
ADMINS.md Merge develop into main (#142) 2021-06-25 17:47:21 -07:00
build.gradle [Infrastructure CI/CD]Count integration test coverage in Codecov (#5954) 2026-11-17 11:06:19 -08:00
CLAUDE.md Add PPL bugfix skill for Claude Code (#5307) 2026-04-10 10:58:01 +08:00
CLAUDE_GUIDE.md [BugFix] Fix bin/chart NPE with null values (#5174) (#5334) 2026-04-13 13:10:32 +08:00
CODE_OF_CONDUCT.md OpenSearch Readiness: SQL/PPL, JDBC, ODBC (#8) 2021-04-16 22:08:52 -07:00
CONTRIBUTING.md Bumps version to 1.2 (#254) 2021-11-04 16:12:35 -07:00
CONTRIBUTORS.md Adding our awesome contributors (#463) 2020-05-11 12:53:40 -07:00
DEVELOPER_GUIDE.rst [Infrastructure CI/CD]Count integration test coverage in Codecov (#5954) 2026-11-17 11:06:19 -08:00
gradle.properties Add gradle.properties file to build sql with -Pcrypto.standard=FIPS=140-3 by default (#5231) 2026-03-17 09:54:04 -07:00
gradlew [3.4.0] Bump Gradle to 9.2.0 and GitHub Action JDK to 25 (#4824) 2025-11-20 14:48:18 +08:00
gradlew.bat [3.4.0] Bump Gradle to 9.2.0 and GitHub Action JDK to 25 (#4824) 2025-11-20 14:48:18 +08:00
LICENSE.txt OpenSearch Readiness: SQL/PPL, JDBC, ODBC (#8) 2021-04-16 22:08:52 -07:00
lombok.config Change the default response format to JDBC. (#334) 2020-01-06 09:01:33 -08:00
MAINTAINERS.md Move some maintainers from active to Emeritus (#5260) 2026-03-24 14:49:21 -07:00
NOTICE Add patterns and grok command (#813) 2022-09-30 09:41:52 -07:00
README.md fix lychee (#5451) 2026-06-24 10:48:37 -07:00
RELEASING.md Merge develop into main (#142) 2021-06-25 17:47:21 -07:00
SECURITY.md Updating security reachout email (#2671) 2024-05-14 10:06:47 -07:00
settings.gradle Add a generic, extensible rest-endpoint provider SPI (#5656) 2026-08-04 09:11:39 -07:00
THIRD-PARTY [Feature] Add grammar bundle generation API for PPL language features (#5162) 2026-03-20 14:31:56 -07:00

OpenSearch SQL

OpenSearch enables you to extract insights out of OpenSearch using the familiar SQL or Piped Processing Language (PPL) query syntax. Use aggregations, group by, and where clauses to investigate your data. Read your data as JSON documents or CSV tables so you have the flexibility to use the format that works best for you.

The following projects are related to the SQL plugin, but stored in the different repos. Please refer to links below for details. This document will focus on the SQL plugin for OpenSearch.

Code Summary

SQL Engine

Test and build [![SQL CI][sql-ci-badge]][sql-ci-link]
Code coverage codecov
Distribution build tests OpenSearch IT tests OpenSearch IT code
Backward compatibility tests BWC tests

Repository Checks

DCO Checker [![Developer certificate of origin][dco-badge]][dco-badge-link]
Link Checker Link Checker

Issues

good first issues open
features open
enhancements open
bugs open
untriaged open
nolabel open

Highlights

Besides basic filtering and aggregation, OpenSearch SQL also supports complex queries, such as querying semi-structured data, JOINs, set operations, sub-queries etc. Beyond the standard functions, OpenSearch functions are provided for better analytics and visualization. Please check our documentation for more details.

Recently we have been actively improving our query engine primarily for better correctness and extensibility. Behind the scene, the new enhanced engine has already supported both SQL and Piped Processing Language. Please find more details in SQL Engine V2 - Release Notes.

Documentation

Please refer to the SQL Language Reference Manual, Piped Processing Language (PPL) Reference Manual, OpenSearch SQL/PPL Engine Development Manual and Technical Documentation for detailed information on installing and configuring plugin.

Forum

For additional help with the plugin, including questions about opening an issue, visit the OpenSearch Forum.

Contributing

See developer guide and how to contribute to this project.

Attribution

This project is based on the Apache 2.0-licensed elasticsearch-sql project. Thank you eliranmoyal, shi-yuan, ansjsun and everyone else who contributed great code to that project. Read this for more details Attributions.

Code of Conduct

This project has adopted an Open Source Code of Conduct.

Security

If you discover a potential security issue in this project we ask that you notify OpenSearch Security directly via email to security@opensearch.org. Please do not create a public GitHub issue.

License

See the LICENSE file for our project's licensing. We will ask you to confirm the licensing of your contribution.

Copyright OpenSearch Contributors. See NOTICE for details.