Hi Long >From the API point of view, this processing time can be omitted. This is mainly for unification: event-time&processing-time scenarios, and alignment with other window APIs.
Thanks Jark Wu for telling me this offline. Best, Guowei On Wed, Nov 3, 2021 at 11:55 AM Long Nguyễn <longnguyen25111...@gmail.com> wrote: > I have read about the Window operator > <https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/table/tableapi/#group-windows> > in Flink documentation and know that it groups rows into finite groups > based on time or row-count intervals. > > I saw an example of a sliding count window right there > <https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/table/tableapi/#slide-sliding-windows> > : > > // Sliding Row-count window (assuming a processing-time attribute > "proctime").window(Slide.over(rowInterval(10)).every(rowInterval(5)).on($("proctime")).as("w")); > > As mentioned in the docs, the on method here is to define: > >> The time attribute to group (time interval) or sort (row count) on. For >> batch queries this might be any Long or Timestamp attribute. For streaming >> queries this must be a declared event-time or processing-time time >> attribute. > > > On the other hand, I searched found this countWindow > <https://ci.apache.org/projects/flink/flink-docs-release-1.13/api/java/org/apache/flink/streaming/api/datastream/KeyedStream.html#countWindow-long-long-> > method > in Flink's Java docs and saw that it does not specify any time-related > parameter. > I'm wondering why a sliding count window in Flink Table APIs requires > processing time whereas it is unnecessary in the Datastream APIs. > > I really appreciate it if someone can clarify this for me. > > -- > ------------------------------------------------------------ > -------------------------------------------------- > Nguyen Dich Long, > School of Information and Communication Technology (SoICT - > https://www.soict.hust.edu.vn) > Hanoi University of Science and Technology (https://www.hust.edu.vn) > 601, B1 Building - No 1, Dai Co Viet Street, Hai Ba Trung District, Ha > Noi, Vietnam > Tel: +84 (0)3.54.41.76.76 > Email: long.nd162...@sis.hust.edu.vn; longnguyen25111...@gmail.com >