Skip to content

feat(sql): add profile support to analytics path#28

Closed
dai-chen wants to merge 1 commit into
mainfrom
sql-profile-support
Closed

feat(sql): add profile support to analytics path#28
dai-chen wants to merge 1 commit into
mainfrom
sql-profile-support

Conversation

@dai-chen

Copy link
Copy Markdown
Owner

Add a profile boolean field to SQLQueryRequest and thread it through the SQL REST handler to the analytics router. Mirrors PPL's existing profile implementation: parsed from the JSON body's profile key and gated by the same isProfileSupported rules (only honored for non- explain JDBC requests on the analytics engine path).

Replaces the hardcoded false in SQLPlugin#createSqlAnalyticsRouter so analytics-engine queries now honor the request's profile flag. The V2 SQL engine path is unchanged; profile is silently ignored when the request does not route to the analytics engine.

Includes:

  • New 6-arg SQLQueryRequest constructor (5-arg delegates with false)
  • isProfileSupported helper in RestSqlAction (mirrors PPL)
  • YAML REST integration tests with analytics-backed index setup
  • New rest-api-spec/api/sql.json and sql.explain.json
  • Documentation in docs/user/interfaces/endpoint.rst

Refs: opensearch-project#5317

Description

[Describe what this change achieves]

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@dai-chen dai-chen force-pushed the sql-profile-support branch 2 times, most recently from 6ae2365 to df1834d Compare May 27, 2026 19:36
Comment thread docs/user/interfaces/endpoint.rst Outdated
Comment thread docs/user/interfaces/endpoint.rst
Comment thread sql/src/main/java/org/opensearch/sql/sql/domain/SQLQueryRequest.java Outdated
Comment thread sql/src/main/java/org/opensearch/sql/sql/domain/SQLQueryRequest.java Outdated
Comment thread sql/src/main/java/org/opensearch/sql/sql/domain/SQLQueryRequest.java Outdated
Comment thread sql/src/main/java/org/opensearch/sql/sql/domain/SQLQueryRequest.java Outdated
@dai-chen dai-chen force-pushed the sql-profile-support branch from df1834d to e50604c Compare May 27, 2026 19:53
Add a `profile` boolean field to SQLQueryRequest and thread it through
the SQL REST handler to the analytics router. Mirrors PPL's existing
profile pattern: parsed from the JSON body's `profile` key, gated by
the same rules (only honored for non-explain JDBC requests on the
analytics engine path).

Replaces the hardcoded `false` in SQLPlugin#createSqlAnalyticsRouter so
analytics-engine queries now honor the request's profile flag. The V2
SQL engine path is unchanged; profile is silently ignored when the
request does not route to the analytics engine.

Refs: opensearch-project#5317
Signed-off-by: Chen Dai <daichen@amazon.com>
@dai-chen dai-chen force-pushed the sql-profile-support branch from e50604c to d05c2b0 Compare May 27, 2026 22:07
@dai-chen dai-chen closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant