嗯,如果是普通的group by,的确是做不到的。 lec ssmi <[email protected]> 于2020年4月27日周一 下午5:59写道:
> 谢谢回答。 > 但这样存在一个问题,加入我不使用window,用普通的group by hour > 来实现聚合,hour为string类型。我也需要丢弃掉晚于watermark的数据, > sql中,在 TableAggregateFunction 里面是无法操作的。 > DataStream 有ProcessFunction,当然是可以实现的。 > > Benchao Li <[email protected]> 于2020年4月27日周一 下午5:47写道: > > > Hi, > > > > 你的理解是对的,只有涉及到时间的一些算子才会有可能丢弃迟到的数据,比如典型的就是Window和CEP。 > > 像普通的算子Map、Filter这种,不涉及到时间的概念,不会丢弃数据的。 > > > > lec ssmi <[email protected]> 于2020年4月27日周一 下午5:38写道: > > > > > Hi: > > > 如果有晚于watermark的数据,只有涉及到时间的算子,比如时间窗口,才会自动地过滤掉这些数据吗?或者说其他算子,比如map,join > > > 也会自动过滤掉而不处理? > > > 感觉类似于ProcessFunction,提供了一个获取currentWatermark的方法,是否不处理,都取决于自己的代码逻辑。 > > > > > > > > > -- > > > > Benchao Li > > School of Electronics Engineering and Computer Science, Peking University > > Tel:+86-15650713730 > > Email: [email protected]; [email protected] > > > -- Benchao Li School of Electronics Engineering and Computer Science, Peking University Tel:+86-15650713730 Email: [email protected]; [email protected]
