soin08 commented on PR #28142:
URL: https://github.com/apache/flink/pull/28142#issuecomment-4769676160
Added `@Experimental` for `SavepointKeyFilter` class, `readKeyedState`
overload in `SavepointReader`, and `BoundInfo`. `getLowerBound` and
`getUpperBound` are left on the interface to allow any future filter introspect
the shape of the intersecting filter without explicit casting to
`RangeKeyFilter`. For example, an `EvenKeyFilter` could do something like
```
@Override
public SavepointKeyFilter intersect(SavepointKeyFilter other) {
....
BoundInfo lower = other.getLowerBound();
BoundInfo upper = other.getUpperBound();
Set<Object> keys = new HashSet<>();
for (long k = lower.getValue(); k <= upper.getValue(); k++) {
if (k % 2 == 0) {
keys.add(k);
}
}
return SavepointKeyFilter.exact(keys);
}
```
--
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]