首页 > 解决方案 > 理解 RowKind 的 UPDATE_BEFORE 的含义

问题描述

我正在阅读的 javadoc RowKind#UPDATE_BEFORE,它说:

    /**
     * Update operation with the previous content of the updated row.
     *
     * <p>This kind SHOULD occur together with {@link #UPDATE_AFTER} for modelling an update that
     * needs to retract the previous row first. It is useful in cases of a non-idempotent update,
     * i.e., an update of a row that is not uniquely identifiable by a key.
     */
    UPDATE_BEFORE("-U", (byte) 1),

我会问

  1. 如果行is not uniquely identifiable by a key,flink怎么知道要收回哪一行,我认为必须有一个唯一的键来识别行?
  2. 它说它对 有用non-idempotent update,这里是什么non-idempotent update意思?

你能帮忙解释一下这个问题吗?谢谢!

标签: apache-flink

解决方案


推荐阅读