-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Bug Description
When calling transform() on an IncrementalExecutionResultImpl, the method returns an IncrementalExecutionResult of the correct type, but loses the incremental-specific field values (incremental, hasNext, incrementalPublisher).
Expected Behavior
The transform() method should preserve both the incremental result type AND its specific field values.
Current Behavior
The transformed result is correctly typed as IncrementalExecutionResult but the incremental data fields are lost/null.
Reproduction
ExecutionResult incrementalResult = IncrementalExecutionResultImpl
.newIncrementalExecutionResult()
.incremental(List.of(DeferPayload.newDeferredItem().data("hello").build()))
.build();
var transformedResult = incrementalResult.transform(builder -> builder.addExtension("key", "value"));
// transformedResult is correctly IncrementalExecutionResult, but incremental data is lost
assert transformedResult instanceof IncrementalExecutionResult; // PASSES
IncrementalExecutionResult incResult = (IncrementalExecutionResult) transformedResult;
assert incResult.getIncremental() != null; // FAILS - incremental data is lostImpact
This breaks the contract that transform() should preserve all result data while allowing modifications. Users lose incremental payloads when transforming results.
Metadata
Metadata
Assignees
Labels
No labels