gemini-code-assist[bot] commented on code in PR #37691:
URL: https://github.com/apache/beam/pull/37691#discussion_r2845541378
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/BagUserState.java:
##########
@@ -54,27 +54,33 @@ public class BagUserState<T> {
private List<T> newValues;
private boolean isCleared;
private boolean isClosed;
+ private final boolean hasNoState;
+ private final boolean onlyBundleForKeys;
static final int BAG_APPEND_BATCHING_LIMIT = 10 * 1024 * 1024;
/** The cache must be namespaced for this state object accordingly. */
public BagUserState(
- Cache<?, ?> cache,
- BeamFnStateClient beamFnStateClient,
- String instructionId,
- StateKey stateKey,
- Coder<T> valueCoder) {
+ Cache<?, ?> cache,
+ BeamFnStateClient beamFnStateClient,
+ String instructionId,
+ StateKey stateKey,
+ Coder<T> valueCoder,
+ boolean hasNoState,
+ boolean onlyBundleForKeys) {
Review Comment:

The indentation for the constructor parameters has been changed from 4
spaces to 2 spaces. This is inconsistent with standard Java formatting
guidelines (e.g., Google Java Style Guide recommends an indent of +4 for
continuation lines) and the previous version of the code. Please restore the
4-space indentation to improve readability.
```suggestion
public BagUserState(
Cache<?, ?> cache,
BeamFnStateClient beamFnStateClient,
String instructionId,
StateKey stateKey,
Coder<T> valueCoder,
boolean hasNoState,
boolean onlyBundleForKeys) {
```
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java:
##########
@@ -677,6 +683,14 @@ static class LazyBlockingStateFetchingIterator implements
PrefetchableIterator<B
this.continuationToken =
stateRequestForFirstChunk.getGet().getContinuationToken();
}
+ LazyBlockingStateFetchingIterator(
+ BeamFnStateClient beamFnStateClient, StateRequest
stateRequestForFirstChunk,
+ boolean hasNoState) {
Review Comment:

The formatting of the new `LazyBlockingStateFetchingIterator` constructor is
inconsistent. To improve readability and adhere to common Java style
conventions (like the Google Java Style Guide), it's better to place each
parameter on a new line with consistent indentation, especially since they
don't fit on a single line.
```suggestion
LazyBlockingStateFetchingIterator(
BeamFnStateClient beamFnStateClient,
StateRequest stateRequestForFirstChunk,
boolean hasNoState) {
```
--
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]