Skip to content

Commit

Permalink
Merge pull request #103 from varshamahuli97/cbrelease-4.8.13.01
Browse files Browse the repository at this point in the history
KAR-544 - logic change for ranking users with same karma points
  • Loading branch information
varshamahuli97 authored May 24, 2024
2 parents ce5e81f + 549b0f4 commit 4951894
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ object LearnerLeaderBoardModel extends AbsDashboardModel {
userLeaderBoardDataDF.show(false)

// sort them based on their fullNames for each rank group within each org
val windowSpecRow = Window.partitionBy("org_id").orderBy(col("rank"), col("last_credit_date").asc)
val windowSpecRow = Window.partitionBy("org_id").orderBy(col("rank"), col("last_credit_date").desc)
userLeaderBoardDataDF = userLeaderBoardDataDF.withColumn("row_num", row_number.over(windowSpecRow))
show(userLeaderBoardDataDF, "orderedData")

Expand Down

0 comments on commit 4951894

Please sign in to comment.