Repository navigation
Default plugins.calcite.enabled=true on the unified query path #5413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ahkcs
merged 4 commits into
opensearch-project:feature/mustang-ppl-integration
from
ahkcs:feature/mustang-unified-context-calcite-default
May 6, 2026
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
4ef37bd
Default plugins.calcite.enabled=true on the unified query path
ahkcs 24c5291
Drop dev docs from this PR — track separately
ahkcs 1d4c113
Address @dai-chen: add CALCITE_ENGINE_ENABLED to default settings map
ahkcs 4ade92f
CalcitePPLRenameIT: switch to column-name-aware row matcher
ahkcs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,152 @@ | ||
| # SOP — PPL Analytics-Engine IT Coverage Report | ||
|
|
||
| Run all PPL ITs through the analytics-engine path against an externally-managed | ||
| cluster, get a bucketed markdown report. Daily. | ||
|
|
||
| Output: `integ-test/build/reports/analytics-compatibility/REPORT.md` | ||
|
|
||
| --- | ||
|
|
||
| ## One-time setup | ||
|
|
||
| JDK 25 + JDK 21, Rust stable, ~15 GB free disk. | ||
|
|
||
| ```bash | ||
| mkdir -p ~/workspace && cd ~/workspace | ||
| git clone git@github.com:opensearch-project/OpenSearch.git | ||
| git clone git@github.com:opensearch-project/sql.git | ||
| ( cd OpenSearch && git remote add upstream https://github.com/opensearch-project/OpenSearch.git ) | ||
| ( cd sql && git remote add ahkcs git@github.com:ahkcs/sql.git ) | ||
| ``` | ||
|
|
||
| **OpenSearch — track `upstream/main` + apply commons-text patch:** | ||
|
|
||
| `upstream/main` already has the full analytics-engine sandbox plugin set | ||
| (`analytics-engine`, `analytics-backend-{datafusion,lucene}`, `composite-engine`, | ||
| `dsl-query-executor`, `parquet-data-format`) and the `dataformat-native` rust | ||
| crate. Track main; rebase daily. | ||
|
|
||
| ```bash | ||
| cd ~/workspace/OpenSearch | ||
| git fetch upstream main && git checkout -B main upstream/main | ||
| ``` | ||
|
|
||
| In `sandbox/plugins/analytics-engine/build.gradle`, add next to the existing | ||
| `commons-math3` runtimeOnly: | ||
|
|
||
| ```groovy | ||
| runtimeOnly "org.apache.commons:commons-text:1.11.0" | ||
| ``` | ||
|
|
||
| `commons-text` is only listed under `resolutionStrategy.force` on main, which | ||
| pins the version but doesn't bundle the jar — without this `runtimeOnly` line | ||
| the cluster dies on `LevenshteinDistance` the first time a query reaches | ||
| Calcite's `SqlFunctions.<clinit>`. Track upstreaming; once it lands, drop this | ||
| patch. | ||
|
|
||
| **Build the native lib (one-time + after rust changes):** | ||
|
|
||
| The cluster JVM loads `libopensearch_native.dylib` (rust + JNI/FFM) at startup | ||
| for DataFusion execution, parquet I/O, and native repository ops. Without it | ||
| the cluster crashes in `NativeBridge.<clinit>`. | ||
|
|
||
| ```bash | ||
| cd ~/workspace/OpenSearch/sandbox/libs/dataformat-native/rust | ||
| cargo build --release -p opensearch-native-lib # ~5 min | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Daily run (~30 min) | ||
|
|
||
| ### 1. Get the SQL bundle worktree | ||
|
|
||
| First time: | ||
| ```bash | ||
| cd ~/workspace/sql | ||
| git fetch ahkcs feature/ppl-coverage-bundle | ||
| DATE=$(date +%Y-%m-%d) | ||
| git worktree add "../sql-ppl-coverage-${DATE}" ahkcs/feature/ppl-coverage-bundle | ||
| ``` | ||
|
|
||
| Reuse same day: | ||
| ```bash | ||
| cd ~/workspace/sql-ppl-coverage-${DATE} | ||
| git fetch ahkcs && git rebase ahkcs/feature/ppl-coverage-bundle | ||
| ``` | ||
|
|
||
| ### 2. Publish the SQL plugin to mavenLocal | ||
|
|
||
| `:run` installs `opensearch-sql-plugin:3.7.0.0-SNAPSHOT` from maven coords — | ||
| mavenLocal first, then OpenSearch CI snapshots. The SQL plugin isn't on CI | ||
| snapshots, so without this step the cluster fails to bootstrap with | ||
| `Could not resolve …`. Re-publish whenever the bundle worktree is updated. | ||
|
|
||
| ```bash | ||
| cd ~/workspace/sql-ppl-coverage-${DATE} | ||
| ./gradlew publishToMavenLocal # ~1 min, JDK 21+ | ||
| ``` | ||
|
|
||
| ### 3. Bring up cluster (terminal A — leave running) | ||
|
|
||
| ```bash | ||
| cd ~/workspace/OpenSearch | ||
| JAVA_HOME=$(mise where java@temurin-25.0.1+8.0.LTS) ./gradlew :run \ | ||
| -Dsandbox.enabled=true \ | ||
| -PinstalledPlugins="['opensearch-job-scheduler:3.7.0.0-SNAPSHOT', \ | ||
| 'analytics-engine', 'parquet-data-format', 'analytics-backend-datafusion', \ | ||
| 'analytics-backend-lucene', 'composite-engine', \ | ||
| 'opensearch-sql-plugin:3.7.0.0-SNAPSHOT']" | ||
| ``` | ||
|
|
||
| Wait for it: | ||
| ```bash | ||
| until curl -sf http://localhost:9200/ >/dev/null; do sleep 4; done | ||
| ``` | ||
|
|
||
| ### 4. Run the report (terminal B) | ||
|
|
||
| ```bash | ||
| cd ~/workspace/sql-ppl-coverage-${DATE} | ||
| rm -rf integ-test/build/test-results/analyticsCompatibility \ | ||
| integ-test/build/test-results/analyticsCompatibilityTest \ | ||
| integ-test/build/reports/analytics-compatibility | ||
|
|
||
| ./gradlew :integ-test:analyticsCompatibilityReport \ | ||
| -Dtests.rest.cluster=localhost:9200 \ | ||
| -Dtests.cluster=localhost:9300 \ | ||
| -Dtests.clustername=runTask | ||
| ``` | ||
|
|
||
| `BUILD SUCCESSFUL` is expected — failures are the report payload, not a build | ||
| break. | ||
|
|
||
| ### 5. Open the report | ||
|
|
||
| ```bash | ||
| open integ-test/build/reports/analytics-compatibility/REPORT.md | ||
| ``` | ||
|
|
||
| ### 6. Tear down | ||
|
|
||
| `Ctrl-C` terminal A. | ||
|
|
||
| --- | ||
|
|
||
| ## When something breaks | ||
|
|
||
| | Symptom | Fix | | ||
| |---|---| | ||
| | `BUILD FAILED … java.io.EOFException … KryoBackedDecoder` | `rm -rf integ-test/build/test-results/analyticsCompatibilityTest` and rerun. | | ||
| | Run finishes <10 min, top bucket is `ConnectException` | Cluster died. Tail `~/workspace/OpenSearch/build/testclusters/runTask-0/logs/runTask.log` for `fatal error`; the missing class usually needs a `runtimeOnly` dep added to `analytics-engine/build.gradle`. | | ||
| | Top bucket is `No backend can scan all requested fields` (thousands) | Parquet flag isn't reaching `TestUtils`. Confirm worktree is on `ahkcs/feature/ppl-coverage-bundle`. | | ||
| | `BUILD FAILED` immediately, log shows `[BUILD] Starting OpenSearch process / Stopping node` | `task.getClusters().clear()` is missing. Re-fetch `feature/ppl-coverage-bundle`. | | ||
|
|
||
| --- | ||
|
|
||
| ## What the bundle branch is | ||
|
|
||
| `ahkcs/feature/ppl-coverage-bundle` rebases on | ||
| `upstream/feature/mustang-ppl-integration` and adds the report task, parquet | ||
| flag, origin classifier, pass-rate fix, and testcluster auto-bind workaround. | ||
| Daily upstream sync: `git rebase upstream/feature/mustang-ppl-integration`. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either add it to default setting list or pass via
setting()API since only unified PPL require this?Ref:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated