This is a fairly classic problem. The solution about this is to filter rows based on if the start date is larger than previous maximum end date assuming rows are sorted by start date before hand. lag function and cummax() can be used to find out previous max end date, and since cummax() is not defined for Date class, we can convert it to integer, apply cummax and then convert it back: