mengw15 opened a new issue, #7829:
URL: https://github.com/apache/texera/issues/7829

   ### Task Summary
   
   `SuccessExecutionResult` has never been referenced anywhere in this 
repository, and the response protocol it mirrors was replaced in 2021.
   
   | Symbol | Location | Lines (src + spec) |
   | --- | --- | ---: |
   | `SuccessExecutionResult` | 
`amber/src/main/scala/org/apache/texera/web/resource/SuccessExecutionResult.scala`
 | 27 + 43 |
   
   ```scala
   case class SuccessExecutionResult(
       resultID: String,
       code: Integer = 0,
       result: List[String] = List()
   )
   ```
   
   It arrived in `41a8a9201` (2020-08-20, "copy latest amber code after vldb 
demo"), the bulk import of the amber prototype, and was already unreferenced on 
arrival. Checking the tree at that commit, and again immediately before the 
2021 refactor below, the only Scala file containing the name is its own 
definition — no resource ever constructed it, so it could never be serialized 
to a client.
   
   The shape it mirrors is the old `{ code, resultID, result }` response 
envelope, which the frontend described with a matching TypeScript 
`SuccessExecutionResult` interface. `ba9473034` (#1214, 2021-07-05, "Refactor 
frontend to handle different incremental output mode from backend") removed 
that envelope — the interface, the `ExecutionResult` union, the 
`isExecutionSuccessful` type guard and the mock fixtures — and replaced it with 
the incremental push protocol still in use today:
   
   ```
   WebResultUpdateEvent(updates: Map[String, WebResultUpdate], tableStats)   
extends TexeraWebSocketEvent
     WebResultUpdate = WebPaginationUpdate(mode, totalNumTuples, 
dirtyPageIndices)
                     | WebDataUpdate(mode, table: List[ObjectNode])
   ```
   
   declared in `web/model/websocket/event/WebResultUpdateEvent.scala` and 
`web/service/ExecutionResultService.scala`. The two were never even the same 
contract — this class declares `result: List[String]` where the frontend 
interface expected an array of result objects — which is consistent with it 
being a stale copy carried in by the import rather than the class that actually 
served the frontend.
   
   `frontend/`, `agent-service/` and `src/main/resources/**` contain no 
reference either, so there is no cross-language or reflective path to it. The 
only thing referencing it today is `SuccessExecutionResultSpec`, added by a 
coverage PR (#5219, 2026-06); that spec covers this class and nothing else, so 
it goes with it.
   
   Note this is a different class from `SyncExecutionResult` in the same 
package, which is live and is being reshaped by the open #6314.
   
   Pure deletion, no behaviour change: -70 lines.
   
   ### Task Type
   - [x] Refactor / Cleanup
   


-- 
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]

Reply via email to