sshiv012 opened a new pull request, #9271:
URL: https://github.com/apache/texera/pull/9271
### What changes were proposed in this PR?
The result store kept one entry per operator, and #9054 filtered it to the
operator's first output port. The result diff handler also took the output mode
from the operator's first external port, and it skipped the table statistics
and result size of an operator if **any** of its ports was `SINGLE_SNAPSHOT`
(HTML). So an operator whose first port is a table and whose second port is
HTML never had its first port's statistics or size recorded.
This PR tracks results per output port on the backend. Nothing sent to the
frontend changes.
- `WorkflowResultStore.resultInfo` is keyed by `GlobalPortIdentity`: one
entry per **external** output port that has a result document, each with its
own tuple count. An operator with two stored ports (e.g. Split) has two
entries. Internal ports are never entries.
- A new `outputModeOf` looks up the output mode of that port in the physical
plan. A result entry whose port is not in the plan fails with an
`IllegalStateException` instead of using another port's mode.
- The result size (`updateResultSize`) is recorded for every changed
non-`SINGLE_SNAPSHOT` port, under that port's id.
- `updates` and `tableStats` in `WebResultUpdateEvent` keep their meaning:
the operator's first port only. A change on a later port is not reported as a
change on the first port.
Partitioners and the data path are not touched.
### Any related issues, documentation, discussions?
Builds on #9054. Part of the multi-port output work in discussion #8914. A
follow-up PR sends live updates for the later ports.
### How was this PR tested?
New specs in `ExecutionResultServiceSpec`:
- one result entry per external output port, each with its own count;
internal ports skipped;
- the first port's update is read from that port's own document, with that
port's statistics;
- a move on a later port is not a move on the first port;
- an HTML later port does not stop the first port's statistics and size;
- a later table port behind an HTML first port has its size recorded under
its own port id;
- a later port's size is recorded only once that port has changed;
- a result entry for a port not in the plan fails loudly.
`WorkflowResultStoreSpec` and `WorkflowServiceSpec` use port keys, and
`WorkflowResultStoreSpec` checks that two ports of one operator are two entries.
```
sbt "WorkflowCore/testOnly *WorkflowResultStoreSpec"
"WorkflowExecutionService/testOnly *ExecutionResultServiceSpec
*WorkflowServiceSpec *TexeraWebSocketEventSpec"
sbt "WorkflowExecutionService/scalafmtCheck"
"WorkflowExecutionService/Test/scalafmtCheck" "WorkflowCore/scalafmtCheck"
"WorkflowCore/Test/scalafmtCheck" "WorkflowExecutionService/scalafixAll --check"
```
All pass except two `WorkflowServiceSpec` cases ("clear the previous run's
storage registry…" and "read the previous run's registered URIs…") that fail
with "a warehouse must be selected for this execution" on my machine. They fail
the same way on `main`.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01SRmgtBces67YppgKLHoZHa
--
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]