uros-b opened a new pull request, #57869:
URL: https://github.com/apache/spark/pull/57869
### What changes were proposed in this pull request?
Removes the redundant `.toString` from four error-message interpolations in
`RocksDBStateStoreProvider.validateAndTransitionState`:
```scala
case UPDATE => s"Cannot update after ${oldState}"
```
### Why are the changes needed?
String interpolation already stringifies embedded values via
`String.valueOf`, so the explicit call adds nothing. The `METRICS` branch in
the same `match` already reads `s"Cannot get metrics in ${oldState} state"`, so
dropping the calls makes all five branches read the same way.
`oldState` is a `case object` of the provider's `STATE` trait with a
compiler-generated `toString` and no custom override, and `state` is
initialized to `UPDATING` and only ever assigned other case objects, so the
rendered text is unchanged.
### Does this PR introduce _any_ user-facing change?
No. The error message text is identical.
### How was this patch tested?
Existing tests cover this path. No test asserts these four message strings;
the messages asserted in `RocksDBStateStoreSuite` and
`RocksDBStateStoreLockHardeningSuite` come from `validateState` and from the
unchanged `METRICS` branch, and the error condition and its `errorMsg`
parameter are untouched.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)
--
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]