File "/.../spark/python/pyspark/sql/connect/window.py", line 292, in pyspark.sql.connect.window.Window.orderBy
Failed example:
df.withColumn("row_number", row_number().over(window)).show()
Expected:
+---+--------+----------+
| id|category|row_number|
+---+--------+----------+
| 1| a| 1|
| 1| a| 2|
| 1| b| 3|
| 2| a| 1|
| 2| b| 2|
| 3| b| 1|
+---+--------+----------+
Got:
+---+--------+----------+
| id|category|row_number|
+---+--------+----------+
| 1| b| 1|
| 1| a| 2|
| 1| a| 3|
| 2| b| 1|
| 2| a| 2|
| 3| b| 1|
+---+--------+----------+