thundergun found a bug that row_number() ordering by a constant get wrong results when there are more than one fragment instances:
In the plan, we can find that ANALYTIC is placed in the fragment with SCAN. So row_number() is performed locally, which gets wrong results.
This is an old issue since we have
IMPALA-6323 and IMPALA-8069. IMPALA-6323 allows analytic functions to have a constant order by clause and they are always ignored after IMPALA-8069. This causes analytic funcs being performed locally instead of globally and can cause incorrect results for some functions like row_number().