DISTINCT starts after SQL has visible bag rows, including repeats.
bag rows first
Show the input
The input bag has 6 rows.
input rows=6
DISTINCT examples are tiny finite bag-to-table transforms; this model shows first-seen representatives for deterministic display and does not claim product SQL output ordering.
Repeats are allowed
The same city can appear in more than one source row before DISTINCT runs.
duplicates visible
Summary
DISTINCT does not change the source bag; it works after the chosen output shape is made.