vvcephei commented on a change in pull request #9039: URL: https://github.com/apache/kafka/pull/9039#discussion_r468214782
########## File path: streams/src/main/java/org/apache/kafka/streams/kstream/SlidingWindows.java ########## @@ -0,0 +1,141 @@ +/* + * 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.kafka.streams.kstream; + +import org.apache.kafka.streams.internals.ApiUtils; +import org.apache.kafka.streams.processor.TimestampExtractor; +import java.time.Duration; +import java.util.Objects; +import static org.apache.kafka.streams.internals.ApiUtils.prepareMillisCheckFailMsgPrefix; + +/** + /** + * A sliding window used for aggregating events. + * <p> + * Sliding Windows are defined based on a record's timestamp, window size based on the given maximum time difference (inclusive) between + * records in the same window and given window grace period. Review comment: Haha, my specialty! The distillation of this sentence is "Windows are defined based on a record's timestamp, window size, and window grace period." I think the meaning is pretty clear, so no need to change anything. Just to point it out, there's structural ambiguity about whether the sentence is saying "a record's (timestamp, window size, window grace period)" (I.e., three properties of the record), or whether there are three top-level things that define the window. The latter was intended. I think actually inserting "the" before "window" both times would clear it up: "Windows are defined based on a record's timestamp, the window size, and the window grace period." Another note is that because the second item in the list is so long, the structure of the list gets a little lost. It would be better in this case to use the Oxford comma to clearly delineate the boundary between the second and third items. So, although I think this is fine as-is, if you want me to break out the red pen, I'd say: ``` * Sliding Windows are defined based on a record's timestamp, the window size based on the given maximum time difference (inclusive) between * records in the same window, and the given window grace period. ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org