Hi,
My understanding of window functions is that they can only operate on fixed window sizes. For example, I can create a window like the following: Window.partitionBy("group_identifier").orderBy("sequencial_counter").rowsBetween(-4, 5) or even: Window.partitionBy("group_identifier").orderBy("sequencial_counter").rowsBetween(Window.unboundedPreceding, Window.unboundedFollowing) one of these boundaries can be a fixed value, thus giving a different sized window for some rows. However, it is my understanding that the following is not possible: Window.partitionBy("group_identifier").orderBy("sequencial_counter").rowsBetween(F.col("back_counter"), F.col("forward_counter")) I guess that a proper answer requires a deeper understanding of window functions than I have now. Why is it that data in a current row cannot be used to set the window used to calculate the new value for that row? Regards,
signature.asc
Description: OpenPGP digital signature