Row_Num function in spark-sql

Hemant
Valued Contributor II

I have a doubt row_num with order by in spark-sql gives different result(non-deterministic output) every time i execute it?

​

It's due to parallelism in spark ?​

​

Any approach how to takle it?

​

I order by with a date column and a integer column and take minimum row_num in the further down stream process.

Hemant Soni