def apply_row_number(df_ordered, window):  # pylint: disable=unused-argument
    """ROW_NUMBER Window Function

    Determines the ordinal number of the current row within a group of rows,
    counting from 1, based on the ORDER BY expression in the OVER clause. If
    the optional PARTITION BY clause is present, the ordinal numbers are reset
    for each group of rows. Rows with equal values for the ORDER BY expressions
    receive the different row numbers nondeterministically.

    https://docs.aws.amazon.com/redshift/latest/dg/r_WF_ROW_NUMBER.html

    """
    _, i, _ = window
    return int(i + 1)