Ниже для BigQuery Standard SQL
#standardSQL
SELECT * EXCEPT(fixed_location) REPLACE(fixed_location AS visited_location) FROM (
SELECT *,
LAST_VALUE(visited_location IGNORE NULLS)
OVER(PARTITION BY person_id ORDER BY calendar_date
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
) fixed_location
FROM `project.dataset.person_visits`
)
, если применить к образцу данных в вашем вопросе - результат
Row person_id calendar_date visited_location holiday_flag
1 1001 2020-02-03 New Jersey N
2 1001 2020-02-04 New Jersey N
3 1001 2020-02-05 New Jersey N
4 1001 2020-02-06 New Jersey N
5 1001 2020-02-07 New Jersey N
6 1001 2020-02-08 New Jersey Y
7 1001 2020-02-09 New Jersey Y
8 1001 2020-02-10 New York N
9 1001 2020-02-11 New York N
10 1001 2020-02-12 New York N
11 1001 2020-02-13 New York N
12 1001 2020-02-14 New York N
13 1001 2020-02-15 New York Y
14 1001 2020-02-16 New York Y
15 1001 2020-02-17 New York Y
16 1001 2020-02-18 Los Angeles N
17 1001 2020-02-19 Los Angeles N