Question 460
A query applies LAG across every transaction, mixing the previous purchase of unrelated customers. Which verification outcome is the strongest evidence of a successful fix?
Explanation
Correct Answer
A customer fixture references only that customer's previous order. This is the most directly relevant verification because window functions do not infer entity boundaries unless a partition is specified. A concrete acceptance check is: A customer fixture references only that customer's previous order. To reduce recurrence: Test multi-customer interleaving and duplicate timestamps.
Incorrect Answers
Date alone does not identify an individual source entity. That consideration does not remove the current constraint: window functions do not infer entity boundaries unless a partition is specified.
A post-join WHERE predicate rejects null-extended outer-join rows. In this situation, window functions do not infer entity boundaries unless a partition is specified.
Generic dropDuplicates does not implement latest-event business semantics. For the observed behavior, window functions do not infer entity boundaries unless a partition is specified.