This can be expensive for large datasets. So we should give a warning for row_number or rank without partition by