Limit is pushed down through a window using the ntile function, which causes results that differ from Hive 2.3.9, and Prestodb 0.268, and older versions of Spark (e.g., 3.1.3).
Assume this data:
Also assume this query:
Spark 3.2.2, Spark 3.3.0, and master produce the following:
However, Spark 3.1.3, Hive 2.3.9, and Prestodb 0.268 produce the following: