Backport PR #42776 on branch 1.3.x (BUG: Incorrect variable window bounds for first row when offset cover all rows)
Backport PR #42776: BUG: Incorrect variable window bounds for first row when offset cover all rows