yaooqinn opened a new pull request, #54673:
URL: https://github.com/apache/spark/pull/54673
### What changes were proposed in this pull request?
Extends the SQL execution REST API (`/api/v1/applications/{appId}/sql/`)
with 3 fields that were available in the internal `SQLExecutionUIData` but not
exposed:
| Field | Type | Description |
|-------|------|-------------|
| `queryId` | String | User-facing query identifier (UUID, null for old
event logs) |
| `errorMessage` | String | Error details for failed executions (null if not
failed) |
| `rootExecutionId` | Long | Parent execution ID for sub-execution hierarchy
(-1 if root) |
**Files changed (2, +8/-2):**
- `api.scala`: Added 3 fields to `ExecutionData` class with
backward-compatible defaults
- `SqlResource.scala`: Populates fields from `SQLExecutionUIData`
### Why are the changes needed?
The client-side SQL tab DataTables rendering (SPARK-55875) needs these
fields to achieve feature parity with the original server-rendered listing
page. Without them, the REST API cannot provide Query ID, Error Message, or Sub
Execution information.
### Does this PR introduce _any_ user-facing change?
Yes — the SQL REST API response now includes `queryId`, `errorMessage`, and
`rootExecutionId` fields. Backward compatible (fields have defaults).
### How was this patch tested?
All 9 existing SQL REST API tests pass (`SqlResourceSuite` +
`SqlResourceWithActualMetricsSuite`).
### Was this patch authored or co-authored using generative AI tooling?
Yes, co-authored with GitHub Copilot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]