masteryhx commented on code in PR #23928:
URL: https://github.com/apache/flink/pull/23928#discussion_r1427533090
##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlValueState.java:
##########
@@ -48,7 +48,11 @@ public T value() throws IOException {
@Override
public void update(T value) throws IOException {
accessCallback.run();
- original.update(wrapWithTs(value));
+ if (value == null) {
Review Comment:
How about just make it like: `original.update(value == null ? null :
wrapWithTs(value));` ?
Just let the original one to process the logic of updating null which should
also follow the contract.
##########
flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlValueStateTestContext.java:
##########
@@ -21,14 +21,14 @@
import org.apache.flink.api.common.state.State;
import org.apache.flink.api.common.state.StateDescriptor;
import org.apache.flink.api.common.state.ValueStateDescriptor;
-import org.apache.flink.api.common.typeutils.base.StringSerializer;
+import org.apache.flink.api.common.typeutils.base.LongSerializer;
/** Test suite for {@link TtlValueState}. */
class TtlValueStateTestContext
Review Comment:
Maybe I missed something.
Why do we have to modify this class ?
--
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]