Re: How watermark is generated in sql DDL statement

2020-04-17 Thread Benchao Li
Actually, BoundedOutOfOrderWatermarkGenerator is only used in tests, the real WatermarkGenerator is code generated in WatermarkGeneratorCodeGenerator lec ssmi 于2020年4月17日周五 下午5:19写道: > I think you are all right. I have I checked the source code of > WatermarkAssignerOperator, and I have found t

Re: How watermark is generated in sql DDL statement

2020-04-17 Thread lec ssmi
I think you are all right. I have I checked the source code of WatermarkAssignerOperator, and I have found the WatermarkGenerator passed in WatermarkAssignerOperator is the interface WatermarkGenerator. And BoundedOutOfOrderWatermarkGenerator is the only implementation class of WatermarkGene

Re: How watermark is generated in sql DDL statement

2020-04-17 Thread Benchao Li
WatermarkAssignerOperator is an inner mechanism for generating watermarks. The "Bounded Out of Orderness" is just one kind of the watermark expressions, which is most commonly used. The main logic of WatermarkAssignerOperator is: - keep currentWatermark and lastWatermark - when each element comes

Re: How watermark is generated in sql DDL statement

2020-04-17 Thread lec ssmi
Maybe you are all right. I was more confused . As the cwiki said, flink could use BoundedOutOfOrderTimestamps , [image: image.png] but I have heard about WatermarkAssignerOperator from Blink developers. Benchao Li 于2020年4月17日周五 下午4:33写道: > Hi lec ssmi, > > It's a good question. In blink plann

Re: How watermark is generated in sql DDL statement

2020-04-17 Thread Benchao Li
Hi lec ssmi, It's a good question. In blink planner, we use code gen to handle watermark expression. And in `WatermarkAssignerOperator` we calculate current watermark when each element comes in. If the watermark - lastEmitedWatermark > watermark interval, we will emit the new watermark. So it's n