jiangpengcheng commented on code in PR #21966: URL: https://github.com/apache/pulsar/pull/21966#discussion_r1467139078
########## pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/state/StateValue.java: ########## @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pulsar.functions.api.state; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public class StateValue { + private final byte[] value; + private final Long version; + private final Boolean isNumber; Review Comment: Some `StateStoreImpl` may not be able to judge whether a value is a number or not, then it will use `null` for the `isNumber` field. So is the `version` field, using `Long` makes it more "extendable", it will allow developers to implement and use `StateStoreImpl` which doesn't have "version" concept. -- 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]
