transformable IncrementalExecutionResult#3693
Conversation
| } | ||
|
|
||
| @Override | ||
| public IncrementalExecutionResult transform(Consumer<ExecutionResult.Builder<?>> builderConsumer) { |
There was a problem hiding this comment.
It would be nice if this Consumer was actually for type IncrementalExecutionResult.Builder, but changing it would either break the override or require adding more generics to ExecutionResult.
As written, the builder given to the consumer is castable to IncrementalExecutionResult.Builder, which is better than nothing. I'm open to feedback/ideas on how to get better typing.
There was a problem hiding this comment.
Good point.
That's a tricky problem though, and I can't think of a nice solution right now.
I'm happy to merge the PR as is if it unblocks you.
|
Hi @jbellenger thanks for the fix! Later today I will release v22.3 which will include your PR, in case you need a point version release for work. |
Calling
IncrementalExecutionResult.transformwill return anExecutionResultImpl(rather than anotherIncrementalExecutionResult), which can cause incremental parts of the execution result to get lost.This makes it difficult to add
@defersupport to a system with existing instrumentations, which might modify an ExecutionResult without knowing that it needs to be handled differently if it is incremental.This PR overrides the implementation of
IncrementalExecutionResult.transformto ensure that the transformed result retains its incremental nature.