toAppendStream:

只对增加的新数据有效,较为局限

实现为

extends RichSinkFunction<Row>

toRetractStream:更新的数据为true,未更新为false

implements SinkFunction<Tuple2<Boolean, Row>>