Avinash_Narala
Databricks Partner

Hi @dbx-user7354 ,

OrderBy() should perform a global sort as showed in plot-2, but as per your problem it is sorting the data within the partitions which is the behavior of sortWithinPartitions(), so to solve this error. Please try with the latest DBR runtime and then try to check the result. I think the problem is from databricks runtime side.

If this helps, mark it as solution.

Regards,

Avinash N