Great breakdown! That exact error has tripped up many a CDC pipeline. When working in PySpark, I typically use a similar window approach with row_number() and a strict tiebreaker like a sequence number before registering the temporary view for the me...