Jefffrey commented on PR #6912: URL: https://github.com/apache/arrow-rs/pull/6912#issuecomment-2614621293
> LGTM; I think just adding a few last test cases to get complete coverage should push this over the line. > > Something interesting about the rank function in arrow-rs is that it seems to behave differently compared to others. > > Postgres: > > > rank () → bigint > > Returns the rank of the current row, with gaps; that is, the row_number of the first row in its peer group. > > * https://www.postgresql.org/docs/current/functions-window.html > > > DuckDB: > > > Description The rank of the current row with gaps; same as row_number of its first peer. > > * https://duckdb.org/docs/sql/functions/window_functions.html#rank > > > SQL Server: > > > If two or more rows tie for a rank, each tied row receives the same rank. For example, if the two top salespeople have the same SalesYTD value, they are both ranked one. > > * https://learn.microsoft.com/en-us/sql/t-sql/functions/rank-transact-sql?view=sql-server-ver16 > > > It seems these other ones would have ties take the lower values, whereas for arrow-rs the existing rank function (and subsequently what is introduced here) takes the higher value; I guess this might be worth a broader discussion, as this PR itself currently follows the existing behaviour > > 🤔 Raised #7024 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
