This bug is found in FLINK-14946:
The plan for the given sql in FLINK-14946 is
however, the plan after sub-plan reuse is:
in the first picture, we could find that the accMode of two joins are different, but the two joins are reused in the second picture.
The reason is the digest of sub-plan reuse does not contain retraction traits for stream physical nodes now.