Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8d18065
Propagate request-task cancellation into the analytics PPL route (#5563)
mch2 Jun 18, 2026
9367c2a
Stabilize PPL ITs on the analytics-engine route (case/string/full-tex…
ahkcs Jun 18, 2026
7f2b60f
Stabilize PPL ITs on the analytics-engine route (array/map-path/datat…
ahkcs Jun 18, 2026
08d8ba1
Stabilize PPL ITs on the analytics-engine route (percentile/float/dat…
ahkcs Jun 18, 2026
7dca5cc
fix: Honor PPL fetch_size on the analytics-engine route (#5567)
ahkcs Jun 19, 2026
d055163
[BugFix] Return all columns (struct and nested fields) listed when us…
quangdutran Jun 19, 2026
d249a47
[Enhancement] Classify unsupported-feature errors as client errors (4…
RyanL1997 Jun 19, 2026
7ed954a
Merge analytics-engine profile into SQL-layer profile (#5571)
dai-chen Jun 19, 2026
5aa6ea0
Stabilize more PPL ITs on the analytics-engine route (sort/streamstat…
ahkcs Jun 19, 2026
f6b6baa
[Enhancement] Reject unsupported output formats on the analytics-engi…
RyanL1997 Jun 19, 2026
b2fd268
allow partial pushdown for semi-scripted predicates (#5565)
Swiddis Jun 19, 2026
4c4166b
[Error Enhancement] Fix NPE when rex sits inside appendcol subsearch …
RyanL1997 Jun 20, 2026
5392d62
[Error Enhancement] Fix NPE on case() with incompatible branch types …
RyanL1997 Jun 22, 2026
0b96cfc
fix lychee (#5451)
Swiddis Jun 24, 2026
e99aff0
Stabilize CalciteStreamstatsCommandIT on the analytics-engine route (…
ahkcs Jun 24, 2026
cb10516
[BugFix] Bump get-ci-image-tag.yml ref to SHA-pinned opensearch-build…
mengweieric Jun 25, 2026
cc65d75
Fix SQL IT test queries, assertions, and data for engine-agnostic com…
dai-chen Jun 25, 2026
0a4d40e
Fix ClassCastException in PPL multisearch on indexes with @timestamp …
gingeekrishna Jun 25, 2026
1dc92d6
Return 4xx instead of 500 for unsupported window functions (#5587)
OVI3D0 Jun 25, 2026
2e9114b
fix: window functions with ORDER BY/LIMIT on unified SQL path (#5592)
dai-chen Jun 29, 2026
1caa639
Fix multi-index FGAC routing and add bypass regression tests (#5581)
finnegancarroll Jun 30, 2026
cfd4b62
Gate analytics engine incompatible IT tests with capability matrix (#…
dai-chen Jun 30, 2026
e4f29d5
Suggest fields for 'field not found' errors (#5402)
Swiddis Jul 1, 2026
87cfe99
[BugFix] Return 400 instead of 500 on vectorSearch() arg-count mismat…
mengweieric Jul 1, 2026
a71179e
feat: Add configurable expression depth limit for AST building (#5602)
dai-chen Jul 1, 2026
307a51e
feat: add json_tree explain format (#5576)
Swiddis Jul 2, 2026
c301013
Support PPL timewrap command (#5241)
ahkcs Jul 6, 2026
4985a39
Widen narrow integer operands in PPL +/-/* to prevent overflow (#5603)
ahkcs Jul 7, 2026
c0d75c9
Onboard new backport-pr re-usable github workflow (sql) (#5586)
peterzhuamazon Jul 7, 2026
3d4938a
fix: Gracefully handle malformed documents in result scanning (#5618)
Swiddis Jul 13, 2026
3a83768
fix(dedup): use Map<String,List<String>> for fieldNameMapping to hand…
gingeekrishna Jul 14, 2026
6a07689
Bump Apache Calcite 1.41.0 -> 1.42.0 (CVE-2026-46718) (#5619)
ahkcs Jul 14, 2026
bf2111b
Fix protocol-dependent HTTP status assertion (#5623)
ahkcs Jul 14, 2026
454ac4e
[Feature] Add PPL `rest` command (#5599)
noCharger Jul 15, 2026
ee52914
Fix flaky TPC-H Q15 floating-point assertion (#5629)
ahkcs Jul 15, 2026
0821b29
Support PPL foreach command (#5613)
songkant-aws Jul 16, 2026
afdbeaf
Detect long (BIGINT) arithmetic overflow instead of silently wrapping…
ahkcs Jul 16, 2026
9a35e76
feat(ci): add PPL lint rule validation check (eventstats PoC)
Jul 19, 2026
738672e
style(ci): use $(...) instead of legacy backticks in ppl-lint workflow
Jul 20, 2026
74fcfaa
ci: re-trigger PPL lint rule validation after Actions recovery
Jul 20, 2026
9aca44c
fix(ci): split ppl-lint validation into frontend/backend jobs
Jul 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/analytics-engine-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
with:
product: opensearch

Expand Down
30 changes: 6 additions & 24 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
---
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
types: [closed, labeled]

jobs:
backport:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
name: Backport
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/github-app-token@1901dc7d52169e70c27a8da37aef0d423e2867a2 # v1.5.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- name: Backport
uses: VachaShah/backport@142d3b8a8c70dc54db515e653e5ed3c3fac64100 # v2.2.0
with:
github_token: ${{ steps.github_app_token.outputs.token }}
head_template: backport/backport-<%= number %>-to-<%= base %>
failure_labels: backport-failed
if: github.repository == 'opensearch-project/sql'
uses: opensearch-project/opensearch-build/.github/workflows/backport-pr.yml@main
secrets:
OPENSEARCH_CI_BOT_TOKEN: ${{ secrets.OPENSEARCH_CI_BOT_TOKEN }}
22 changes: 0 additions & 22 deletions .github/workflows/delete_backport_branch.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/integ-tests-with-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
with:
product: opensearch

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue-dedupe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
detect:
if: (github.event_name == 'issues' && github.event.issue.user.type != 'Bot') || (github.event_name == 'workflow_dispatch' && inputs.job == 'detect')
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-detect.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-detect.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
permissions:
contents: read
issues: write
Expand All @@ -36,7 +36,7 @@ jobs:

auto-close:
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.job == 'auto-close')
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-autoclose.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-autoclose.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
permissions:
issues: write
with:
Expand Down
157 changes: 157 additions & 0 deletions .github/workflows/ppl-lint-rule-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: PPL lint rule validation

# Cross-repository check: the OpenSearch-Dashboards (OSD) PPL lint rule
# `unsupported-window-function-in-eventstats` and the SQL backend must agree.
#
# Frontend half (frontend job): a SQL-owned Node script loads the compiled OSD
# analyzer from an OSD checkout and asserts the rule's diagnostic counts. This
# runs on a bare ubuntu-latest runner because OSD requires a modern Node whose
# prebuilt binary needs a newer glibc than the OpenSearch CI container (Amazon
# Linux 2) provides.
# Backend half (backend job): a Gradle integration test sends the same queries
# to the live `/_plugins/_ppl` endpoint of the SQL plugin built from this
# checkout. This runs inside the OpenSearch CI container because the Gradle
# test cluster needs it.
#
# Both jobs are required; a failure on either side fails the SQL PR check.
#
# The OSD detector is loaded from `main` by default (PR and nightly runs), so a
# removed or changed detector is detected. `workflow_dispatch` can target a
# specific OSD ref to reproduce a run or test an unmerged OSD branch.

on:
pull_request:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
inputs:
osd_ref:
description: OSD commit or branch to test instead of main
required: false
type: string

jobs:
frontend:
name: Frontend contract (OSD analyzer)
runs-on: ubuntu-latest
steps:
- name: Checkout SQL pull request
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Resolve OSD ref
id: osd-ref
env:
REQUESTED_REF: ${{ inputs.osd_ref }}
run: echo "ref=${REQUESTED_REF:-main}" >> "$GITHUB_OUTPUT"

- name: Checkout OpenSearch-Dashboards
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: opensearch-project/OpenSearch-Dashboards
ref: ${{ steps.osd-ref.outputs.ref }}
path: .ci/OpenSearch-Dashboards

- name: Record OSD revision
run: |
sha=$(git -C .ci/OpenSearch-Dashboards rev-parse HEAD)
echo "OSD revision: \`$sha\` (ref: ${{ steps.osd-ref.outputs.ref }})" >> "$GITHUB_STEP_SUMMARY"

# Read the Node/Yarn toolchain from the OSD checkout rather than hardcoding
# it, so an OSD toolchain bump does not silently drift this job.
- name: Set up Node from OSD .nvmrc
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version-file: .ci/OpenSearch-Dashboards/.nvmrc

- name: Pin Yarn from OSD engines
working-directory: .ci/OpenSearch-Dashboards
run: |
yarn_range=$(node -e "process.stdout.write(require('./package.json').engines.yarn)")
# Take the lower bound of the engines.yarn range (e.g. "^1.22.10" -> "1.22.10").
yarn_version=$(echo "$yarn_range" | sed -E 's/[^0-9.]//g')
npm install -g "yarn@${yarn_version}"

- name: Cache OSD Yarn dependencies
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
with:
path: |
~/.cache/yarn
key: ${{ runner.os }}-osd-yarn-${{ hashFiles('.ci/OpenSearch-Dashboards/yarn.lock') }}
restore-keys: |
${{ runner.os }}-osd-yarn-

- name: Bootstrap OpenSearch-Dashboards
working-directory: .ci/OpenSearch-Dashboards
run: yarn osd bootstrap

# The Gradle test cluster runs the version from build.gradle's
# `opensearch.version` default (e.g. 3.8.0-SNAPSHOT). Export the release
# portion (3.8.0) as PPL_SQL_VERSION so the frontend applies the same
# version filtering the backend does, without maintaining a second string.
- name: Resolve OpenSearch version
id: os-version
run: |
raw=$(grep -oE '"opensearch.version", "[^"]+"' build.gradle | head -1 | sed -E 's/.*"opensearch.version", "([^"]+)"/\1/')
version="${raw%%-*}"
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "OpenSearch version: \`$version\` (from \`$raw\`)" >> "$GITHUB_STEP_SUMMARY"

- name: Run frontend contract
working-directory: .ci/OpenSearch-Dashboards
env:
PPL_LINT_CONTRACT_FILE: ${{ github.workspace }}/integ-test/src/test/resources/ppl-lint/unsupported-window-function-in-eventstats.spec.json
PPL_SQL_VERSION: ${{ steps.os-version.outputs.version }}
run: |
node -r ./src/setup_node_env \
"$GITHUB_WORKSPACE/scripts/ppl-lint/run-frontend-contract.mjs" \
| tee "$GITHUB_WORKSPACE/frontend-contract.log"

- name: Upload frontend log
if: ${{ failure() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
continue-on-error: true
with:
name: ppl-lint-frontend-contract-log
path: frontend-contract.log

Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
with:
product: opensearch

backend:
name: Backend integration test (live /_plugins/_ppl)
needs: Get-CI-Image-Tag
runs-on: ubuntu-latest
container:
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}

steps:
- name: Run start commands
run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}

- name: Checkout SQL pull request
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Set up JDK 21
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: 'temurin'
java-version: 21

# OpenSearch refuses to start as root, so run Gradle as a non-root user.
- name: Run backend integration test
run: |
chown -R 1000:1000 "$(pwd)"
su "$(id -un 1000)" -c "./gradlew :integ-test:integTest --tests org.opensearch.sql.calcite.remote.PplLintRuleValidationIT"

- name: Upload failure artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
continue-on-error: true
with:
name: ppl-lint-backend-artifacts
path: |
integ-test/build/reports/**
integ-test/build/testclusters/*/logs/*
4 changes: 2 additions & 2 deletions .github/workflows/pr_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
Code-Diff-Analyzer:
uses: opensearch-project/opensearch-build/.github/workflows/code-diff-analyzer.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/code-diff-analyzer.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
if: github.repository == 'opensearch-project/sql'
permissions:
id-token: write # github oidc to assume aws roles
Expand All @@ -18,7 +18,7 @@ jobs:
update_pr_comment_with_analyzer_report: true

Code-Diff-Reviewer:
uses: opensearch-project/opensearch-build/.github/workflows/code-diff-reviewer.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/code-diff-reviewer.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
needs: Code-Diff-Analyzer
if: github.repository == 'opensearch-project/sql'
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sql-pitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ run-name:

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
with:
product: opensearch

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sql-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
with:
product: opensearch

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sql-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ run-name:

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@761e093b8c1349cc07f21c1d681d3b30bf9e1999 # main
with:
product: opensearch

Expand Down
12 changes: 12 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# example opensearch/dashboards ports
http://localhost:5601
http://localhost:9200

# sites that block scraping
https://hg.openjdk.org/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
https://www.linkedin.com/in/*/

# we have many pull requests links due to changelogs, skip these as they're unlikely to break and it saves API usage
https://github.com/opendistro-for-elasticsearch/sql/pull/*
https://github.com/opensearch-project/sql/pull/*

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ The following projects are related to the SQL plugin, but stored in the differen
| [![untriaged open][untriaged-badge]][untriaged-link] |
| [![nolabel open][nolabel-badge]][nolabel-link] |

[dco-badge]: https://github.com/opensearch-project/sql/actions/workflows/dco.yml/badge.svg
[dco-badge-link]: https://github.com/opensearch-project/sql/actions/workflows/dco.yml
[link-check-badge]: https://github.com/opensearch-project/sql/actions/workflows/link-checker.yml/badge.svg
[link-check-link]: https://github.com/opensearch-project/sql/actions/workflows/link-checker.yml
[bwc-tests-badge]: https://img.shields.io/badge/BWC%20tests-in%20progress-yellow
Expand Down
4 changes: 2 additions & 2 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ plugins {
dependencies {
api project(':ppl')
api project(':sql')
api group: 'org.apache.calcite', name: 'calcite-babel', version: '1.41.0'
api group: 'org.apache.calcite', name: 'calcite-babel', version: "${calcite_version}"

testImplementation testFixtures(project(':api'))
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: "${hamcrest_version}"
testImplementation group: 'org.mockito', name: 'mockito-core', version: "${mockito_version}"
testImplementation group: 'org.apache.calcite', name: 'calcite-testkit', version: '1.41.0'
testImplementation group: 'org.apache.calcite', name: 'calcite-testkit', version: "${calcite_version}"

testFixturesApi group: 'junit', name: 'junit', version: '4.13.2'
testFixturesApi group: 'org.hamcrest', name: 'hamcrest', version: "${hamcrest_version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public UnifiedQueryContext build() {
private UnifiedQueryParser<?> createParser(CalcitePlanContext planContext, Settings settings) {
return switch (queryType) {
case PPL -> new PPLQueryParser(settings);
case SQL -> new SqlV2QueryParser();
case SQL -> new SqlV2QueryParser(settings);
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.opensearch.sql.calcite.CalciteRelNodeVisitor;
import org.opensearch.sql.common.antlr.SyntaxCheckException;
import org.opensearch.sql.common.error.ErrorReport;
import org.opensearch.sql.exception.CalciteUnsupportedException;
import org.opensearch.sql.exception.QueryEngineException;
import org.opensearch.sql.exception.SemanticCheckException;

Expand Down Expand Up @@ -73,6 +74,10 @@ public RelNode plan(String query) {
}
return plan;
});
} catch (CalciteUnsupportedException e) {
// Unsupported feature (e.g. table functions) is an invalid query, i.e. a client error.
// Must precede the QueryEngineException branch as it is a subclass.
throw new SemanticCheckException(e.getMessage(), e);
} catch (SyntaxCheckException
| QueryEngineException
| UnsupportedOperationException
Expand Down
Loading
Loading